[Python-checkins] cpython (3.2): Issue #13145. Fix incorrect documentation for PyNumber_ToBase. Thanks Sven
mark.dickinson
python-checkins at python.org
Tue Oct 11 19:06:48 CEST 2011
http://hg.python.org/cpython/rev/61eb59516b55
changeset: 72855:61eb59516b55
branch: 3.2
parent: 72845:ea233722a4b6
user: Mark Dickinson <mdickinson at enthought.com>
date: Tue Oct 11 18:06:36 2011 +0100
summary:
Issue #13145. Fix incorrect documentation for PyNumber_ToBase. Thanks Sven Marnach.
files:
Doc/c-api/number.rst | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Doc/c-api/number.rst b/Doc/c-api/number.rst
--- a/Doc/c-api/number.rst
+++ b/Doc/c-api/number.rst
@@ -239,10 +239,10 @@
.. c:function:: PyObject* PyNumber_ToBase(PyObject *n, int base)
- Returns the integer *n* converted to *base* as a string with a base
- marker of ``'0b'``, ``'0o'``, or ``'0x'`` if applicable. When
- *base* is not 2, 8, 10, or 16, the format is ``'x#num'`` where x is the
- base. If *n* is not an int object, it is converted with
+ Returns the integer *n* converted to base *base* as a string. The *base*
+ argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the
+ returned string is prefixed with a base marker of ``'0b'``, ``'0o'``, or
+ ``'0x'``, respectively. If *n* is not a Python int, it is converted with
:c:func:`PyNumber_Index` first.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list