mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-36048: Use __index__() instead of __int__() for implicit conversion if available. (GH-11952)
Deprecate using the __int__() method in implicit conversions of Python numbers to C integers.
This commit is contained in:
parent
d90a141bb9
commit
6a44f6eef3
18 changed files with 326 additions and 55 deletions
|
@ -11,6 +11,9 @@ Number Protocol
|
|||
Returns ``1`` if the object *o* provides numeric protocols, and false otherwise.
|
||||
This function always succeeds.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
Returns ``1`` if *o* is an index integer.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyNumber_Add(PyObject *o1, PyObject *o2)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue