diff options
author | Benjamin Peterson <benjamin@python.org> | 2008-10-30 22:44:18 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2008-10-30 22:44:18 (GMT) |
commit | d79af0fc52ef13c531ca4dfb6bf96359626765a3 (patch) | |
tree | 61fd926bcbdcf3f389932c1b4ac94c57bd0388e1 /Doc/library | |
parent | b5f8208b49bbe399efaf7b246b47acf6e5dc8487 (diff) | |
download | cpython-d79af0fc52ef13c531ca4dfb6bf96359626765a3.zip cpython-d79af0fc52ef13c531ca4dfb6bf96359626765a3.tar.gz cpython-d79af0fc52ef13c531ca4dfb6bf96359626765a3.tar.bz2 |
finish backporting binary literals and new octal literals docs
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/stdtypes.rst | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 737ea97..f5a4e6c 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -246,14 +246,15 @@ Complex numbers have a real and imaginary part, which are each implemented using pair: octal; literals Numbers are created by numeric literals or as the result of built-in functions -and operators. Unadorned integer literals (including hex and octal numbers) -yield plain integers unless the value they denote is too large to be represented -as a plain integer, in which case they yield a long integer. Integer literals -with an ``'L'`` or ``'l'`` suffix yield long integers (``'L'`` is preferred -because ``1l`` looks too much like eleven!). Numeric literals containing a -decimal point or an exponent sign yield floating point numbers. Appending -``'j'`` or ``'J'`` to a numeric literal yields a complex number with a zero real -part. A complex numeric literal is the sum of a real and an imaginary part. +and operators. Unadorned integer literals (including binary, hex, and octal +numbers) yield plain integers unless the value they denote is too large to be +represented as a plain integer, in which case they yield a long integer. +Integer literals with an ``'L'`` or ``'l'`` suffix yield long integers (``'L'`` +is preferred because ``1l`` looks too much like eleven!). Numeric literals +containing a decimal point or an exponent sign yield floating point numbers. +Appending ``'j'`` or ``'J'`` to a numeric literal yields a complex number with a +zero real part. A complex numeric literal is the sum of a real and an imaginary +part. .. index:: single: arithmetic |