diff options
author | Eric Smith <eric@trueblade.com> | 2010-04-06 15:17:33 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2010-04-06 15:17:33 (GMT) |
commit | 6a92860a3ed4a6deaef31d641c4a91a4b396ee2d (patch) | |
tree | a2f4d3f93a0e8f05170aba73eece5bd67bd2f208 /Doc/whatsnew | |
parent | 2b051d7459499c4deefe7a726470824614a7b9dd (diff) | |
download | cpython-6a92860a3ed4a6deaef31d641c4a91a4b396ee2d.zip cpython-6a92860a3ed4a6deaef31d641c4a91a4b396ee2d.tar.gz cpython-6a92860a3ed4a6deaef31d641c4a91a4b396ee2d.tar.bz2 |
Note that PEP 378 also applies to int.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/2.7.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index e18db48..e0e4e0f 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -218,6 +218,11 @@ width and the precision:: >>> '{:20,.2f}'.format(18446744073709551616.0) '18,446,744,073,709,551,616.00' +When formatting an integer, include the comma after the width: + + >>> '{:20,d}'.format(18446744073709551616) + '18,446,744,073,709,551,616' + This mechanism is not adaptable at all; commas are always used as the separator and the grouping is always into three-digit groups. The comma-formatting mechanism isn't as general as the :mod:`locale` |