[issue33039] int() and math.trunc don't accept objects that only define __index__
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Jan. 13, 2019
2:47 a.m.
Nick Coghlan <ncoghlan@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@bugs.python.org> <https://bugs.python.org/issue33039> _______________________________________
2229
Age (days ago)
2229
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nick Coghlan