diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2013-01-27 10:17:52 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2013-01-27 10:17:52 (GMT) |
commit | 07c71365244ce496042566d94bdd469f7d3b1bf6 (patch) | |
tree | 6de3120c827869ed95aca8c6b034bbbc5d9c61ee /Doc | |
parent | 3a62e45b974611c80ba9e21670cfbfbe2bd193c1 (diff) | |
download | cpython-07c71365244ce496042566d94bdd469f7d3b1bf6.zip cpython-07c71365244ce496042566d94bdd469f7d3b1bf6.tar.gz cpython-07c71365244ce496042566d94bdd469f7d3b1bf6.tar.bz2 |
Issue #16772: in int(x, base), non-integer bases must have an __index__ method.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index c52dc06..64b46a3 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -665,6 +665,12 @@ are always available. They are listed here in alphabetical order. The integer type is described in :ref:`typesnumeric`. + .. versionchanged:: 3.4 + If *base* is not an instance of :class:`int` and the *base* object has a + :meth:`base.__index__ <object.__index__>` method, that method is called + to obtain an integer for the base. Previous versions used + :meth:`base.__int__ <object.__int__>` instead of :meth:`base.__index__ + <object.__index__>`. .. function:: isinstance(object, classinfo) |