Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60dd7dc

Browse files
committed
Merge
2 parents bb0ad4c + 1c027e5 commit 60dd7dc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/c-api/number.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ Number Protocol
239239
240240
.. c:function:: PyObject* PyNumber_ToBase(PyObject *n, int base)
241241
242-
Returns the integer *n* converted to *base* as a string with a base
243-
marker of ``'0b'``, ``'0o'``, or ``'0x'`` if applicable. When
244-
*base* is not 2, 8, 10, or 16, the format is ``'x#num'`` where x is the
245-
base. If *n* is not an int object, it is converted with
242+
Returns the integer *n* converted to base *base* as a string. The *base*
243+
argument must be one of 2, 8, 10, or 16. For base 2, 8, or 16, the
244+
returned string is prefixed with a base marker of ``'0b'``, ``'0o'``, or
245+
``'0x'``, respectively. If *n* is not a Python int, it is converted with
246246
:c:func:`PyNumber_Index` first.
247247
248248

0 commit comments

Comments
 (0)