summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEric Smith <eric@trueblade.com>2009-05-05 14:04:18 (GMT)
committerEric Smith <eric@trueblade.com>2009-05-05 14:04:18 (GMT)
commit63376228a3f2d3ac4a21a10c0653c3b984c2d686 (patch)
treee781a7c8a1abe5c032d83bbc2948c4bd34d4d77e /Doc
parent86a05ecdb5eb91cf174e9b3c8adf0187e868aa68 (diff)
downloadcpython-63376228a3f2d3ac4a21a10c0653c3b984c2d686.zip
cpython-63376228a3f2d3ac4a21a10c0653c3b984c2d686.tar.gz
cpython-63376228a3f2d3ac4a21a10c0653c3b984c2d686.tar.bz2
Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/conversion.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/conversion.rst b/Doc/c-api/conversion.rst
index 403c183..318842c 100644
--- a/Doc/c-api/conversion.rst
+++ b/Doc/c-api/conversion.rst
@@ -119,10 +119,10 @@ The following functions provide locale-independent string to number conversions.
Convert a :ctype:`double` *val* to a string using supplied
*format_code*, *precision*, and *flags*.
- *format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``, ``'g'``,
- ``'G'``, ``'s'``, or ``'r'``. For ``'s'`` and ``'r'``, the supplied
- *precision* must be 0 and is ignored. These specify the standard
- :func:`str` and :func:`repr` formats, respectively.
+ *format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``,
+ ``'g'``, ``'G'`` or ``'r'``. For ``'r'``, the supplied *precision*
+ must be 0 and is ignored. The ``'r'`` format code specifies the
+ standard :func:`repr` format.
*flags* can be zero or more of the values *Py_DTSF_SIGN*,
*Py_DTSF_ADD_DOT_0*, or *Py_DTSF_ALT*, or-ed together: