Mercurial > cpython-lru_cache-weakref
diff Python/pystrtod.c @ 52773:28096ed73153
Added ',' thousands grouping to int.__format__. See PEP 378.
This is incomplete, but I want to get some version into the next alpha. I am still working on:
Documentation.
More tests.
Implement for floats.
In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
| author | Eric Smith <eric@trueblade.com> |
|---|---|
| date | Fri, 03 Apr 2009 14:45:06 +0000 |
| parents | 48e83e66935a |
| children | b653eab13b73 |
line wrap: on
line diff
--- a/Python/pystrtod.c Fri Apr 03 11:19:31 2009 +0000 +++ b/Python/pystrtod.c Fri Apr 03 14:45:06 2009 +0000 @@ -368,7 +368,7 @@ /* At this point, p points just past the right-most character we want to format. We need to add the grouping string for the characters between buffer and p. */ - return _PyBytes_InsertThousandsGrouping(buffer, len, p-buffer, + return _PyBytes_InsertThousandsGroupingLocale(buffer, len, p-buffer, buf_size, NULL, 1); }
