-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Local annotation turns local variables in cells #130924
New issue
Have a question about this project 8000 ? 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
Comments
Maybe @JelleZijlstra can look into this -- it smells like an unanticipated effect of PEP 749? |
Yes, I already assigned it to myself to look into. I think this is harmless in the sense that it doesn't change any behavior we should guarantee, but it's a pessimization. |
I can confirm that this is related to PEP-749. |
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
Compiling this function
Gives this bytecode:
Local variable annotations are supposed to be ignored by Python (they are used by static type checkers only),
so the addition of the annotation should not change the generated code.
The expected disassembly:
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: