[Python-checkins] r74329 - in python/branches/release26-maint: Doc/library/functions.rst
georg.brandl
python-checkins at python.org
Thu Aug 6 17:08:32 CEST 2009
Author: georg.brandl
Date: Thu Aug 6 17:08:32 2009
New Revision: 74329
Log:
Merged revisions 74328 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().
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Doc/library/functions.rst
Modified: python/branches/release26-maint/Doc/library/functions.rst
==============================================================================
--- python/branches/release26-maint/Doc/library/functions.rst (original)
+++ python/branches/release26-maint/Doc/library/functions.rst Thu Aug 6 17:08:32 2009
@@ -540,15 +540,15 @@
Consider using the :func:`raw_input` function for general input from users.
-.. function:: int([x[, radix]])
+.. function:: int([x[, base]])
Convert a string or number to a plain integer. If the argument is a string,
it must contain a possibly signed decimal number representable as a Python
- integer, possibly embedded in whitespace. The *radix* parameter gives the
+ integer, possibly embedded in whitespace. The *base* parameter gives the
base for the conversion (which is 10 by default) and may be any integer in
- the range [2, 36], or zero. If *radix* is zero, the proper radix is
+ the range [2, 36], or zero. If *base* is zero, the proper radix is
determined based on the contents of string; the interpretation is the same as
- for integer literals. (See :ref:`numbers`.) If *radix* is specified and *x*
+ for integer literals. (See :ref:`numbers`.) If *base* is specified and *x*
is not a string, :exc:`TypeError` is raised. Otherwise, the argument may be a
plain or long integer or a floating point number. Conversion of floating
point numbers to integers truncates (towards zero). If the argument is
@@ -635,11 +635,11 @@
interpreter. Free variables are not returned in class blocks.
-.. function:: long([x[, radix]])
+.. function:: long([x[, base]])
Convert a string or number to a long integer. If the argument is a string, it
must contain a possibly signed number of arbitrary size, possibly embedded in
- whitespace. The *radix* argument is interpreted in the same way as for
+ whitespace. The *base* argument is interpreted in the same way as for
:func:`int`, and may only be given when *x* is a string. Otherwise, the argument
may be a plain or long integer or a floating point number, and a long integer
with the same value is returned. Conversion of floating point numbers to
@@ -647,6 +647,7 @@
The long type is described in :ref:`typesnumeric`.
+
.. function:: map(function, iterable, ...)
Apply *function* to every item of *iterable* and return a list of the results.
More information about the Python-checkins
mailing list