Browse Source
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
pull/13734/head
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
pull/13734/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 181 additions and 23 deletions
-
8Doc/c-api/complex.rst
-
4Doc/c-api/float.rst
-
21Doc/library/functions.rst
-
8Doc/reference/datamodel.rst
-
11Doc/whatsnew/3.8.rst
-
7Lib/test/test_cmath.py
-
18Lib/test/test_complex.py
-
15Lib/test/test_float.py
-
6Lib/test/test_getargs2.py
-
2Lib/test/test_index.py
-
66Lib/test/test_int.py
-
4Misc/NEWS.d/next/Core and Builtins/2019-05-31-11-55-49.bpo-20092.KIMjBW.rst
-
19Objects/abstract.c
-
6Objects/complexobject.c
-
9Objects/floatobject.c
@ -0,0 +1,4 @@ |
|||
Constructors of :class:`int`, :class:`float` and :class:`complex` will now |
|||
use the :meth:`~object.__index__` special method, if available and the |
|||
corresponding method :meth:`~object.__int__`, :meth:`~object.__float__` |
|||
or :meth:`~object.__complex__` is not available. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue