You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Annotated assignment in a match block does not generate SETUP_ANNOTATIONS #105164
There is no SETUP_ANNOTATIONS opcode generated despite the __annotations__ access later on. (Found via google/pytype#1435 - for some reason this does not generate a runtime error, but it does cause issues for tools like pytype.)
changed the title [-]annotated assignment in a match block does not generate SETUP_ANNOTATIONS[/-][+]Annotated assignment in a `match` block does not generate `SETUP_ANNOTATIONS`[/+]on May 31, 2023
Activity
yilei commentedon May 31, 2023
FWIW, it's a runtime error when the module is imported, not run as main:
brandtbucher commentedon May 31, 2023
I think
find_annincompile.cneeds to be taught aboutMatch_kind.Looks like @JelleZijlstra picked this up already. Feel free to ping me for review!
[-]annotated assignment in a match block does not generate SETUP_ANNOTATIONS[/-][+]Annotated assignment in a `match` block does not generate `SETUP_ANNOTATIONS`[/+]pythongh-105164: Detect annotations inside match blocks
gh-105164: Detect annotations inside match blocks (#105177)
pythongh-105164: Detect annotations inside match blocks (pythonGH-105177
[3.11] pythongh-105164: Detect annotations inside match blocks (pytho…
[3.12] gh-105164: Detect annotations inside match blocks (GH-105177) (#…
[3.11] gh-105164: Detect annotations inside match blocks (GH-105177). (…
hauntsaninja commentedon Sep 7, 2023
Thanks, looks like this is fixed