[Python-checkins] cpython (2.7): Issue #17728: Specify default precision for float.format for presentation types

eric.smith python-checkins at python.org
Mon Apr 15 15:56:09 CEST 2013


http://hg.python.org/cpython/rev/725d6347ac7e
changeset: 83392:725d6347ac7e
branch: 2.7
parent: 83381:bbb3aa45b4ea
user: Eric V. Smith <eric at trueblade.com>
date: Mon Apr 15 09:51:54 2013 -0400
summary:
 Issue #17728: Specify default precision for float.format for presentation types e, f, and g.
files:
 Doc/library/string.rst | 5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -453,12 +453,13 @@
 +=========+==========================================================+
 | ``'e'`` | Exponent notation. Prints the number in scientific |
 | | notation using the letter 'e' to indicate the exponent. |
+ | | The default precision is ``6``. |
 +---------+----------------------------------------------------------+
 | ``'E'`` | Exponent notation. Same as ``'e'`` except it uses an |
 | | upper case 'E' as the separator character. |
 +---------+----------------------------------------------------------+
 | ``'f'`` | Fixed point. Displays the number as a fixed-point |
- | | number. |
+ | | number. The default precision is ``6``. |
 +---------+----------------------------------------------------------+
 | ``'F'`` | Fixed point. Same as ``'f'``. |
 +---------+----------------------------------------------------------+
@@ -484,7 +485,7 @@
 | | the precision. |
 | | |
 | | A precision of ``0`` is treated as equivalent to a |
- | | precision of ``1``. |
+ | | precision of ``1``. The default precision is ``6``. |
 +---------+----------------------------------------------------------+
 | ``'G'`` | General format. Same as ``'g'`` except switches to |
 | | ``'E'`` if the number gets too large. The |
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /