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
1660a61a
Commit
1660a61a
authored
Sep 11, 2019
by
Brennan D Baraban
Committed by
Julien Palard
Sep 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-23460: Fix documentation for decimal string :g formatting (GH-11850)
parent
1a53c785
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
Doc/library/string.rst
Doc/library/string.rst
+4
-3
Misc/NEWS.d/next/Documentation/2019-02-14-07-12-48.bpo-23460.Iqiqtm.rst
...xt/Documentation/2019-02-14-07-12-48.bpo-23460.Iqiqtm.rst
+1
-0
No files found.
Doc/library/string.rst
View file @
1660a61a
...
...
@@ -500,9 +500,10 @@ The available presentation types for floating point and decimal values are:
| | |
| | The precise rules are as follows: suppose that the |
| | result formatted with presentation type ``'e'`` and |
| | precision ``p-1`` would have exponent ``exp``. Then |
| | if ``-4 <= exp < p``, the number is formatted |
| | with presentation type ``'f'`` and precision |
| | precision ``p-1`` would have exponent ``exp``. Then, |
| | if ``m <= exp < p``, where ``m`` is -4 for floats and -6 |
| | for :class:`Decimals <decimal.Decimal>`, the number is |
| | formatted with presentation type ``'f'`` and precision |
| | ``p-1-exp``. Otherwise, the number is formatted |
| | with presentation type ``'e'`` and precision ``p-1``. |
| | In both cases insignificant trailing zeros are removed |
...
...
Misc/NEWS.d/next/Documentation/2019-02-14-07-12-48.bpo-23460.Iqiqtm.rst
0 → 100644
View file @
1660a61a
The documentation for decimal string formatting using the `:g` specifier has been updated to reflect the correct exponential notation cutoff point. Original patch contributed by Tuomas Suutari.
\ No newline at end of file
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