[issue44921] dict subclassing is slow
Kevin Shweh
report at bugs.python.org
Tue Aug 17 17:21:42 EDT 2021
Kevin Shweh <kevin.shweh at gmail.com> added the comment:
Of course it's reasonable to support dict subclasses. We already have a bunch of dict subclasses in the standard library, like collections.defaultdict and collections.Counter, and collections.Counter is significantly slower than it could be because of this issue. (collections.defaultdict seems to be unaffected due to differences between classes implemented in C and Python.) dict.__getitem__ even has dedicated support for a __missing__ hook, which is only useful for subclasses.
----------
nosy: +Kevin Shweh
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44921>
_______________________________________
More information about the Python-bugs-list
mailing list