gh-115808: Add ``is_none`` and ``is_not_none`` operators by ThexXTURBOXx · Pull Request #115814 · python/cpython

@ThexXTURBOXx

@ghost

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Eclips4

@Eclips4

Please, update the documentation for this module (Doc/library/operator.rst)

@ThexXTURBOXx

@Eclips4 Thank you for the suggestion, updated it accordingly.

AlexWaygood

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! In order for this to be merged, it would also need:

Here's the most recent PR that added a new function to the operator module, which you could use as a reference:

@bedevere-app

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@ThexXTURBOXx

I have made the requested changes; please review again

AlexWaygood

AlexWaygood

@ThexXTURBOXx

I have made the requested changes; please review again

AlexWaygood

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks pretty good to me now. We'll need to wait a while to see if anybody voices any objections on the issue before we can consider merging this, though.

@ThexXTURBOXx

No problem, take your time! And thank you very much for your valuable comments. They helped me shape my first PR here such that it fits your needs!

sobolevn

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I have several nitpicks :)

Eclips4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bateller

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Fidget-Spinner

@ThexXTURBOXx

@ThexXTURBOXx

@ThexXTURBOXx

@ThexXTURBOXx

@ThexXTURBOXx

@ThexXTURBOXx

Eclips4

@ThexXTURBOXx

@ThexXTURBOXx

Thanks for the comments - fixed!

@Eclips4

Thanks for the comments - fixed!

Looks good, thanks.

However, what is about is_not_none #115808 (comment)?

I think it should be implemented, and I think that it is okay to do so in this PR, since these things are related.

cc @AlexWaygood @rhettinger

@ThexXTURBOXx

@ThexXTURBOXx

However, what is about is_not_none #115808 (comment)?
I think it should be implemented, and I think that it is okay to do so in this PR, since these things are related.

You are right. I haven't seen this comment yet. I have also added an appropriate is_not_none function.

@ThexXTURBOXx

Eclips4

@Eclips4 Eclips4 changed the title gh-115808: Add is_none operator gh-115808: Add is_none and is_not_none operators

Aug 6, 2024

AA-Turner

@AA-Turner

If there are no outstanding concerns I'll look to merge this in the next few days (cc @Eclips4 if you have any final comments)

A

Eclips4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThexXTURBOXx

You're more than welcome, thanks for the reviews! :)

@AA-Turner

blhsing pushed a commit to blhsing/cpython that referenced this pull request

Aug 22, 2024
…ython#115814)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>