Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
Compiling this function
deff(x):a:xreturnx
Gives this bytecode:
-- MAKE_CELL 0 (x) 1 RESUME 0 3 LOAD_DEREF 0 (x) RETURN_VALUELocal 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:
1 RESUME 0 3 LOAD_LAST 0 (x) RETURN_VALUECPython versions tested on:
CPython main branch
Operating systems tested on:
No response