Index: Doc/c-api/number.rst =================================================================== --- Doc/c-api/number.rst (revision 62516) +++ Doc/c-api/number.rst (working copy) @@ -290,6 +290,15 @@ .. versionadded:: 2.5 +.. cfunction:: PyObject* PyNumber_ToBase(PyObject *n, int base) + + Returns the the integer *n* converted to *base* as a string with a base + marker of ``'0b'``, ``'0o'``, or ``'0x'`` if applicable. If *n* is not an + int object, it is converted with :cfunc:`PyNumber_Index` first. + + .. versionadded:: 2.6 + + .. cfunction:: Py_ssize_t PyNumber_AsSsize_t(PyObject *o, PyObject *exc) Returns *o* converted to a Py_ssize_t value if *o* can be interpreted as an