diff options
author | Eric Smith <eric@trueblade.com> | 2010-04-06 15:21:59 (GMT) |
---|---|---|
committer | Eric Smith <eric@trueblade.com> | 2010-04-06 15:21:59 (GMT) |
commit | 21e85c707e1b8fba2cffd55453a75202114a8662 (patch) | |
tree | a9d88c4a4f7ab63344a4ba98592610cb71a1406e /Doc/whatsnew | |
parent | 2b1a11655183f90e735d8d76eb136475f2aadf4d (diff) | |
download | cpython-21e85c707e1b8fba2cffd55453a75202114a8662.zip cpython-21e85c707e1b8fba2cffd55453a75202114a8662.tar.gz cpython-21e85c707e1b8fba2cffd55453a75202114a8662.tar.bz2 |
Merged revisions 79833 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79833 | eric.smith | 2010-04-06 11:17:33 -0400 (Tue, 06 Apr 2010) | 1 line
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 fa04190..329518d 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -210,6 +210,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` |