diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-12-11 01:07:29 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-12-11 01:07:29 (GMT) |
commit | 41176ae1d2f4ab6dc0f7fc4ea76efad1248c0c5b (patch) | |
tree | 1bde1c9c341c911c363ef7993ea101735468c7c7 /Doc | |
parent | bc538e38527bf836291be5b6ac28644b27abd07e (diff) | |
download | cpython-41176ae1d2f4ab6dc0f7fc4ea76efad1248c0c5b.zip cpython-41176ae1d2f4ab6dc0f7fc4ea76efad1248c0c5b.tar.gz cpython-41176ae1d2f4ab6dc0f7fc4ea76efad1248c0c5b.tar.bz2 |
Issue #28916: Correct description of %o and %x alternative forms
* In Python 3, the specifier is 0o
* There is no special case for leading zeros
* Remove duplicate tests
* Clarify other existing tests and comments
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/stdtypes.rst | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 5936c68..5690611 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2193,15 +2193,12 @@ The conversion types are: Notes: (1) - The alternate form causes a leading zero (``'0'``) to be inserted between - left-hand padding and the formatting of the number if the leading character - of the result is not already a zero. + The alternate form causes a leading octal specifier (``'0o'``) to be + inserted before the first digit. (2) The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on whether - the ``'x'`` or ``'X'`` format was used) to be inserted between left-hand padding - and the formatting of the number if the leading character of the result is not - already a zero. + the ``'x'`` or ``'X'`` format was used) to be inserted before the first digit. (3) The alternate form causes the result to always contain a decimal point, even if @@ -3294,15 +3291,12 @@ The conversion types are: Notes: (1) - The alternate form causes a leading zero (``'0'``) to be inserted between - left-hand padding and the formatting of the number if the leading character - of the result is not already a zero. + The alternate form causes a leading octal specifier (``'0o'``) to be + inserted before the first digit. (2) The alternate form causes a leading ``'0x'`` or ``'0X'`` (depending on whether - the ``'x'`` or ``'X'`` format was used) to be inserted between left-hand padding - and the formatting of the number if the leading character of the result is not - already a zero. + the ``'x'`` or ``'X'`` format was used) to be inserted before the first digit. (3) The alternate form causes the result to always contain a decimal point, even if |