]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910)
authorBar Harel <bar.harel@biocatch.com>
Tue, 10 May 2022 21:23:45 +0000 (00:23 +0300)
committerGitHub <noreply@github.com>
Tue, 10 May 2022 21:23:45 +0000 (14:23 -0700)
commit30a43586f0d1776d25beb71b92f9880be7997e1b
treeee687cdb9f119fefe39f1eefa9941ad8af25e835
parentf481a02e6c7c981d1316267bad5fb94fee912ad6
bpo-39264: Fix UserDict.get() to account for __missing__() (GH-17910)

Here's the patch according to the discussion at the [Python-Dev mailing list](https://mail.python.org/archives/list/python-dev@python.org/thread/SDXOEMAEM6KQ3CQCJVBVRT5QNSPAVU6X/).
UserDict.get() will match dict's behavior and not call `__missing__`.

Automerge-Triggered-By: GH:rhettinger
Lib/collections/__init__.py
Lib/test/test_collections.py
Misc/NEWS.d/next/Library/2020-01-09-01-57-12.bpo-39264.GsBL9-.rst [new file with mode: 0644]