Skip to content

gh-115808: Add is_none and is_not_none operators - #115814

Merged
AA-Turner merged 14 commits into
python:mainfrom
ThexXTURBOXx:issue-115808
Aug 10, 2024
Merged

gh-115808: Add is_none and is_not_none operators#115814
AA-Turner merged 14 commits into
python:mainfrom
ThexXTURBOXx:issue-115808

Conversation

@ThexXTURBOXx

@ThexXTURBOXxThexXTURBOXx commented Feb 22, 2024

Copy link
Copy Markdown
Contributor

This PR adds an is_none operator and an appropriate test.
I hope I did not forget to update/reference it anywhere else.

Fixes#115808

@ghost

ghost commented Feb 22, 2024

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app

Copy link
Copy Markdown

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.

Comment threadMisc/NEWS.d/next/Library/2024-02-22-10-12-59.gh-issue-115808.F2g2Ku.rst Outdated
@Eclips4

Copy link
Copy Markdown
Member

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

@ThexXTURBOXx

Copy link
Copy Markdown
ContributorAuthor

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

AlexWaygood
AlexWaygood previously requested changes Feb 22, 2024

@AlexWaygoodAlexWaygood left a comment

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown
ContributorAuthor

I have made the requested changes; please review again

Comment threadDoc/library/operator.rst Outdated
Comment threadDoc/library/operator.rst Outdated
Comment threadModules/_operator.c Outdated
@ThexXTURBOXx

Copy link
Copy Markdown
ContributorAuthor

I have made the requested changes; please review again

@AlexWaygoodAlexWaygood left a comment

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
ContributorAuthor

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!

@sobolevnsobolevn left a comment

Copy link
Copy Markdown
Member

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 :)

Comment threadModules/_operator.c Outdated
Comment threadModules/_operator.c Outdated
Comment threadLib/test/test_operator.py Outdated
Comment threadLib/operator.py Outdated
@ThexXTURBOXxThexXTURBOXx mentioned this pull request Feb 22, 2024

@Eclips4Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks very good for me. Good job @ThexXTURBOXx 👍

@batellerbateller left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment threadModules/_operator.c
@ThexXTURBOXx

ThexXTURBOXx commented Mar 4, 2024

Copy link
Copy Markdown
ContributorAuthor

Rebased on main

@ThexXTURBOXx

Copy link
Copy Markdown
ContributorAuthor

Rebased on main

@ThexXTURBOXx

Copy link
Copy Markdown
ContributorAuthor

Rebased on main

Comment threadDoc/whatsnew/3.13.rst Outdated
Comment threadDoc/library/operator.rst Outdated
@ThexXTURBOXx

Copy link
Copy Markdown
ContributorAuthor

Thanks for the comments - fixed!

@Eclips4

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
ContributorAuthor

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.

Comment threadModules/_operator.c Outdated
@Eclips4Eclips4 changed the title gh-115808: Add is_none operatorgh-115808: Add is_none and is_not_none operatorsAug 6, 2024
@AA-Turner

Copy link
Copy Markdown
Member

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

@Eclips4Eclips4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks @ThexXTURBOXx for your efforts!

@ThexXTURBOXx

Copy link
Copy Markdown
ContributorAuthor

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

@AA-Turner
AA-Turner merged commit 5580f31 into python:mainAug 10, 2024
@AA-Turner

Copy link
Copy Markdown
Member

Thanks all!

A

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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add operator.is_none()

7 participants

@ThexXTURBOXx@Eclips4@AA-Turner@sobolevn@bateller@Fidget-Spinner@AlexWaygood