-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-107674: Remove some unnecessary code in instrumentation code #117393
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
gh-107674: Remove some unnecessary code in instrumentation code #117393
Conversation
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
FWIW, I'm unclear about the merit of this PR relative to addressing the performance regression identified in gh-107674. However, the change itself is correct and not a problem, so I don't see any reason not to merge it.
The changes (including the one in Also, even though it might not be significant or even observable, this strictly improves the performance by removing an unnecessary comparison, so the gh issue is not that irrelevant :) |
Considering the simplicity of this PR, maybe we can merge it? Not sure if @markshannon is busy recently. |
This might not be super helpful but it's free and easy to justify. Also it makes the code cleaner, not messier.
line >= 0
was already asserted above so the check is unnecessaryPy_None
is immortal now soPy_DECREF
is a no-op.