[issue27275] KeyError thrown by optimised collections.OrderedDict.popitem()

Serhiy Storchaka report at bugs.python.org
Sun Aug 1 15:52:12 EDT 2021


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

PR 27528 makes the C implementation of OrderedDict.popitem() consistent with the Python implementation (do not call overridden __getitem__ and __setitem__).

PR 27530 changes also both implementations of OrderedDict.pop(). It simplifies the C code, but adds a duplication of the code in Python.

I am not sure how far we should backport these changes if backport them.

----------

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


More information about the Python-bugs-list mailing list