[docs] [issue33039] int() and math.trunc don't accept objects that only define __index__
Nick Coghlan
report at bugs.python.org
Sun Jan 13 02:47:36 EST 2019
Nick Coghlan <ncoghlan at gmail.com> added the comment:
@Rémi Aye, filling out derived slots is one of the things PyType_Ready does.
This would need a discussion on python-dev before going ahead and doing it though, as the closest equivalent we have to this right now is the "negative" derivation, where overriding __eq__ without overriding __hash__ implicitly marks the derived class as unhashable (look for "type->tp_hash = PyObject_HashNotImplemented;").
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33039>
_______________________________________
More information about the docs
mailing list