summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2009-04-03 14:45:06 (GMT)
committerEric Smith <eric@trueblade.com>2009-04-03 14:45:06 (GMT)
commita3b1ac8dca5afa01d9d542e125052014a9af56eb (patch)
treeb48929a3d3460d116182f81e7fb80dab5548211f /Python
parentf8c8b6d3ea995d9ddce9470fe6fd2a9c956a5d5d (diff)
downloadcpython-a3b1ac8dca5afa01d9d542e125052014a9af56eb.zip
cpython-a3b1ac8dca5afa01d9d542e125052014a9af56eb.tar.gz
cpython-a3b1ac8dca5afa01d9d542e125052014a9af56eb.tar.bz2
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).
Diffstat (limited to 'Python')
-rw-r--r--Python/pystrtod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c
index b373852..b81abce 100644
--- a/Python/pystrtod.c
+++ b/Python/pystrtod.c
@@ -368,7 +368,7 @@ add_thousands_grouping(char* buffer, size_t buf_size)
/* 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);
}