diff options
author | Georg Brandl <georg@python.org> | 2009-08-13 07:56:35 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-08-13 07:56:35 (GMT) |
commit | 1b5ab457f2d5541657d3bb618478853e2001eeb8 (patch) | |
tree | 3fd9225624a42c6e4ef764c8f3f8e218f61782f7 /Doc/library/functions.rst | |
parent | d07ac6402422abbc54215478e042bbb009148cf9 (diff) | |
download | cpython-1b5ab457f2d5541657d3bb618478853e2001eeb8.zip cpython-1b5ab457f2d5541657d3bb618478853e2001eeb8.tar.gz cpython-1b5ab457f2d5541657d3bb618478853e2001eeb8.tar.bz2 |
Merged revisions 74328,74332-74333,74365 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74328 | georg.brandl | 2009-08-06 17:06:25 +0200 (Do, 06 Aug 2009) | 1 line
Fix base keyword arg name for int() and long().
........
r74332 | georg.brandl | 2009-08-06 19:23:21 +0200 (Do, 06 Aug 2009) | 1 line
Fix punctuation and one copy-paste error.
........
r74333 | georg.brandl | 2009-08-06 19:43:55 +0200 (Do, 06 Aug 2009) | 1 line
#6658: fix two typos.
........
r74365 | georg.brandl | 2009-08-13 09:48:05 +0200 (Do, 13 Aug 2009) | 1 line
#6679: Remove mention that sub supports no flags.
........
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r-- | Doc/library/functions.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index a999e63..198ff7b 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -514,7 +514,7 @@ are always available. They are listed here in alphabetical order. to provide elaborate line editing and history features. -.. function:: int([number | string[, radix]]) +.. function:: int([number | string[, base]]) Convert a number or string to an integer. If no arguments are given, return ``0``. If a number is given, return ``number.__int__()``. Conversion of @@ -522,10 +522,10 @@ are always available. They are listed here in alphabetical order. a base-radix integer literal optionally preceded by '+' or '-' (with no space in between) and optionally surrounded by whitespace. A base-n literal consists of the digits 0 to n-1, with 'a' to 'z' (or 'A' to 'Z') having - values 10 to 35. The default radix is 10. The allowed values are 0 and 2-36. + values 10 to 35. The default *base* is 10. The allowed values are 0 and 2-36. Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``, - ``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Radix 0 - means to interpret exactly as a code literal, so that the actual radix is 2, + ``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0 + means to interpret exactly as a code literal, so that the actual base is 2, 8, 10, or 16, and so that ``int('010', 0)`` is not legal, while ``int('010')`` is, as well as ``int('010', 8)``. |