diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-06-01 21:05:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 21:05:48 (GMT) |
commit | bdbad71b9def0b86433de12cecca022eee91bd9f (patch) | |
tree | 147c8a3e08454a95e0e4900388d88f7b65430f63 /Misc/NEWS.d/next | |
parent | 1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f (diff) | |
download | cpython-bdbad71b9def0b86433de12cecca022eee91bd9f.zip cpython-bdbad71b9def0b86433de12cecca022eee91bd9f.tar.gz cpython-bdbad71b9def0b86433de12cecca022eee91bd9f.tar.bz2 |
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
Diffstat (limited to 'Misc/NEWS.d/next')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2019-05-31-11-55-49.bpo-20092.KIMjBW.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-05-31-11-55-49.bpo-20092.KIMjBW.rst b/Misc/NEWS.d/next/Core and Builtins/2019-05-31-11-55-49.bpo-20092.KIMjBW.rst new file mode 100644 index 0000000..7536dc3 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2019-05-31-11-55-49.bpo-20092.KIMjBW.rst @@ -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. |