Skip to content

EHN: return early when the result is None #62032

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 2 commits into from
Aug 4, 2025

Conversation

zhiqiangxu
Copy link
Contributor

There's no need to continue the loop when the result is destined to be None.

@jbrockmendel
Copy link
Member

I prefer single-return, but not a huge deal

@zhiqiangxu
Copy link
Contributor Author

I prefer single-return, but not a huge deal

Switched to using break instead.

@mroeschke mroeschke added the Index Related to the Index class or subclasses label Aug 4, 2025
@mroeschke mroeschke added this to the 3.0 milestone Aug 4, 2025
@mroeschke mroeschke merged commit ff2b77c into pandas-dev:main Aug 4, 2025
47 checks passed
@mroeschke
Copy link
Member

Thanks @zhiqiangxu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants