diff options
author | J. Nick Koston <nick@koston.org> | 2023-07-13 19:18:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 19:18:53 (GMT) |
commit | 8d2f3c36caf9ecdee1176314b18388aef6e7f2c2 (patch) | |
tree | 8c9db77b946611cc5a758bdeee2bed5efa879bfb /Misc | |
parent | e6e0ea0113748db1e9fe675be6db9041cd5cce1f (diff) | |
download | cpython-8d2f3c36caf9ecdee1176314b18388aef6e7f2c2.zip cpython-8d2f3c36caf9ecdee1176314b18388aef6e7f2c2.tar.gz cpython-8d2f3c36caf9ecdee1176314b18388aef6e7f2c2.tar.bz2 |
gh-106664: selectors: add get() method to _SelectorMapping (#106665)
It can be used to avoid raising and catching KeyError twice via __getitem__.
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-07-12-03-04-45.gh-issue-106664.ZeUG78.rst | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-07-12-03-04-45.gh-issue-106664.ZeUG78.rst b/Misc/NEWS.d/next/Library/2023-07-12-03-04-45.gh-issue-106664.ZeUG78.rst new file mode 100644 index 0000000..c278cad --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-07-12-03-04-45.gh-issue-106664.ZeUG78.rst @@ -0,0 +1 @@ +:mod:`selectors`: Add ``_SelectorMapping.get()`` method and optimize ``_SelectorMapping.__getitem__()``. |