10000 gh-115808: Add ``is_none`` and ``is_not_none`` operators by ThexXTURBOXx · Pull Request #115814 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-115808: Add is_none and is_not_none operators #115814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Aug 10, 2024
Merged
Prev Previous commit
Next Next commit
Apply suggestions
  • Loading branch information
ThexXTURBOXx committed Aug 6, 2024
commit 576a0858ea8c519329ae6d9b39b9cd1e8476aded
2 changes: 1 addition & 1 deletion Doc/library/operator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ truth tests, identity tests, and boolean operations:

Return ``a is None``. Tests object identity.

.. versionadded:: 3.13
.. versionadded:: 3.14


The mathematical and bitwise operations are the most numerous:
Expand Down
7 changes: 0 additions & 7 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -896,13 +896,6 @@ opcode
documented or exposed through ``dis``, and were not intended to be
used externally.

operator
--------

* A new function ``operator.is_none`` has been added, such that
``operator.is_none(obj)`` is equivalent to ``obj is None``.
(Contributed by Raymond Hettinger and Nico Mexis in :gh:`115808`.)

os
--

Expand Down
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ Add notes for JSON serialization errors that allow to identify the source
of the error.
(Contributed by Serhiy Storchaka in :gh:`122163`.)

operator
--------

* A new function ``operator.is_none`` has been added, such that
``operator.is_none(obj)`` is equivalent to ``obj is None``.
(Contributed by Raymond Hettinger and Nico Mexis in :gh:`115808`.)

os
--

Expand Down
Loading
0