mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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:
parent
0fd97e46c7
commit
5580f31c56
7 changed files with 107 additions and 3 deletions
|
@ -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
|
||||
--
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue