[Python-Dev] Scope object (Re: nonlocals() function?)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Apr 6 11:28:25 CEST 2010


Cesare Di Mauro wrote:

> It will certainly. There's MUCH that can be optimized to let CPython 
> squeeze more performance from static analysis (even a gross one) on locals.

But can the existing locals() function be implemented in
the face of such optimisations?

If it can, then a "locals view" object shouldn't be too much
harder.

If it can't, then you have already given up full CPython
compatibility.

-- 
Greg


More information about the Python-Dev mailing list