Nick Coghlan <ncogh...@gmail.com> added the comment:

We're OK with the idea that installing a trace function might automatically 
turn off various compiler and interpreter managed optimisations (it's similar 
to how requesting or implying reliance on full frame support in other 
implementations can disable various optimisations). For trace hooks like 
coverage tools and debuggers, that's often downright desirable, since it makes 
the runtime behaviour correlate more directly with the source code.

What we're aiming to avoid is requiring that implementations make the assertion 
in "a = 1; locals('a') = 2; assert a == 2" pass at function scope, and if 
anything, we'd prefer to make it a requirement for that assertion to *fail*.

Requiring locals to actually *be* a write-through proxy (for all locals, not 
just cell references) would revert Python's semantics to the state they were in 
before the "fast locals" concept was first introduced, and we have no intention 
of going back there.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30744>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to