[issue45707] Variable reassginment triggers incorrect behaviors of locals()
Josh Rosenberg
report at bugs.python.org
Thu Nov 4 00:26:18 EDT 2021
Josh Rosenberg <shadowranger+python at gmail.com> added the comment:
This is a documented feature of locals() (it's definitionally impossible to auto-vivify *real* locals, because real locals are statically assigned to specific indices in a fixed size array at function compile time, and the locals() function is returning a copy of said bindings, not a live view of them).
----------
nosy: +josh.r
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45707>
_______________________________________
More information about the Python-bugs-list
mailing list