Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented May 5, 2024

@gaogaotiantian
Copy link
Member

While you are on this matter, could you change the else if part to an assertion? The locals should either be a FrameLocalsProxy or a mapping at least. Just remove the else if case and change that to an assertion. Then you can always return locals at the end of the function.

Otherwise, logically, you need to handle the else case which should not ever exist.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Good to go!

@sobolevn sobolevn merged commit a8e5fed into python:main May 6, 2024
@sobolevn sobolevn deleted the issue-118613 branch May 6, 2024 07:35
@sobolevn
Copy link
Member Author

sobolevn commented May 6, 2024

Since #115153 was not backported, I also don't backport.

Thanks everyone! 👍

@gaogaotiantian
Copy link
Member

This piece of code has only been in main for like 2 days so there's no need to backport :)

SonicField pushed a commit to SonicField/cpython that referenced this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants