]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-27275: Change popitem() and pop() methods of collections.OrderedDict (GH-27530)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 3 Aug 2021 11:00:55 +0000 (14:00 +0300)
committerGitHub <noreply@github.com>
Tue, 3 Aug 2021 11:00:55 +0000 (13:00 +0200)
commit8c9f847997196aa76500d1ae104cbe7fe2a467ed
tree6f7b08d25d4ca71d14ac2447e732fcd4b068b76f
parent83ca46b7784b7357d82ec47b33295e09ed7380cb
bpo-27275: Change popitem() and pop() methods of collections.OrderedDict (GH-27530)

* Unify the C and Python implementations of OrderedDict.popitem().

The C implementation no longer calls ``__getitem__`` and ``__delitem__``
methods of the OrderedDict subclasses.

* Change popitem() and pop() methods of collections.OrderedDict

For consistency with dict both implementations (pure Python and C)
of these methods in OrderedDict no longer call __getitem__ and
__delitem__ methods of the OrderedDict subclasses.

Previously only the Python implementation of popitem() did not
call them.
Lib/collections/__init__.py
Lib/test/test_ordered_dict.py
Misc/NEWS.d/next/Library/2021-08-01-19-49-09.bpo-27275.QsvE0k.rst [new file with mode: 0644]
Objects/odictobject.c