gh-115808: Add `is_none and is_not_none to operator` (#115814)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
This commit is contained in:
Nico Mexis 2024-08-10 21:16:34 +02:00 committed by GitHub
parent 0fd97e46c7
commit 5580f31c56
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 107 additions and 3 deletions

View file

@ -124,6 +124,15 @@ Add notes for JSON serialization errors that allow to identify the source
of the error.
(Contributed by Serhiy Storchaka in :gh:`122163`.)
operator
--------
* Two new functions ``operator.is_none`` and ``operator.is_not_none``
have been added, such that ``operator.is_none(obj)`` is equivalent
to ``obj is None`` and ``operator.is_not_none(obj)`` is equivalent
to ``obj is not None``.
(Contributed by Raymond Hettinger and Nico Mexis in :gh:`115808`.)
os
--