[issue30744] Local variable assignment is broken when combined with threads + tracing + closures
Nick Coghlan
report at bugs.python.org
Thu Jun 29 02:50:23 EDT 2017
Nick Coghlan added the comment:
The problem I see with proxy objects for functions/coroutines/generators is that it *doesn't* match how locals() currently behaves in the absence of a tracing function - that gives you a "single shared snapshot" behaviour, where writes to the result of locals() *don't* affect the original namespace.
I agree that replacing frame.f_locals with a write-through proxy would be a good way to get rid of PyFrame_LocalsToFast, though (and thus fix the bug this issue covers).
The point where we disagree is that I think we should replace the tracing-or-not distinction with a locals()-or-frame.f_locals distinction, not get rid of the distinction entirely.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30744>
_______________________________________
More information about the Python-bugs-list
mailing list