[issue30744] Local variable assignment is broken when combined with threads + tracing + closures

Nick Coghlan report at bugs.python.org
Sun Oct 22 11:03:22 EDT 2017


Nick Coghlan <ncoghlan at gmail.com> added the comment:

No, as locals() never returns the write-through proxy in the latest version of the PEP - it only ever returns the dynamic snapshot namespace (retrieving it from the proxy if necessary).

To get access to the write-through proxy in Python level code, you have to access frame.f_locals directly (which trace functions will do by necessity, since that's the only way they have to get at the function locals).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30744>
_______________________________________


More information about the Python-bugs-list mailing list