Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21e85c7

Browse files
committed
Merged revisions 79833 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent 2b1a116 commit 21e85c7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Doc/whatsnew/2.7.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ width and the precision::
210210
>>> '{:20,.2f}'.format(18446744073709551616.0)
211211
'18,446,744,073,709,551,616.00'
212212

213+
When formatting an integer, include the comma after the width:
214+
215+
>>> '{:20,d}'.format(18446744073709551616)
216+
'18,446,744,073,709,551,616'
217+
213218
This mechanism is not adaptable at all; commas are always used as the
214219
separator and the grouping is always into three-digit groups. The
215220
comma-formatting mechanism isn't as general as the :mod:`locale`

0 commit comments

Comments
 (0)