summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2010-04-06 14:30:15 (GMT)
committerEric Smith <eric@trueblade.com>2010-04-06 14:30:15 (GMT)
commitc4663856d962ac9f23711936557c4bfb73ccf765 (patch)
treea9b43913d32200ce7e2edfaf3aee4a44a6837e30 /Doc
parentabe448c49b4d986c279de3835b0676ccf8b6c57f (diff)
downloadcpython-c4663856d962ac9f23711936557c4bfb73ccf765.zip
cpython-c4663856d962ac9f23711936557c4bfb73ccf765.tar.gz
cpython-c4663856d962ac9f23711936557c4bfb73ccf765.tar.bz2
Fixed PEP 378 example.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/whatsnew/2.7.rst7
1 files changed, 1 insertions, 6 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst
index 8a46ff4..e18db48 100644
--- a/Doc/whatsnew/2.7.rst
+++ b/Doc/whatsnew/2.7.rst
@@ -215,14 +215,9 @@ mini-language used by the :meth:`str.format` method. When
formatting a floating-point number, simply include a comma between the
width and the precision::
- >>> '{:20,.2}'.format(f)
+ >>> '{:20,.2f}'.format(18446744073709551616.0)
'18,446,744,073,709,551,616.00'
-.. XXX this example seems wrong:
-.. >>> f = 18446744073709551616.0
-.. >>> '{:20,.2}'.format(f)
-.. ' 1.8e+19'
-
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`