[issue45266] subtype_clear can not be called from derived types

Victor Milovanov report at bugs.python.org
Wed Sep 22 15:18:47 EDT 2021


Victor Milovanov <lostfreeman at gmail.com> added the comment:

To put it differently, if you think in terms of MRO, my custom type's MRO is

my_type_clear (from my type), subtype_clear (from PyTypeObject), etc

And subtype_clear incorrectly assumes that it is the first entry in the object's MRO list for tp_clear.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45266>
_______________________________________


More information about the Python-bugs-list mailing list