[issue43246] Dict copy optimization violates subclass invariant

Inada Naoki report at bugs.python.org
Thu Feb 18 21:54:18 EST 2021


Inada Naoki <songofacandy at gmail.com> added the comment:

I am not sure this should be fixed.

If so, I think we should use PyDict_CheckExact() instead of PyDict_Check() && (tp_iter is overridden || keys() is overridden || sq_item is overridden).

----------
nosy: +rhettinger

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


More information about the Python-bugs-list mailing list