Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c4663856
Commit
c4663856
authored
Apr 06, 2010
by
Eric Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed PEP 378 example.
parent
abe448c4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
Doc/whatsnew/2.7.rst
Doc/whatsnew/2.7.rst
+1
-6
No files found.
Doc/whatsnew/2.7.rst
View file @
c4663856
...
...
@@ -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,.2
f}'.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`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment