[Python-Dev] Re: scope-collapse (was: anonymous blocks)

Jim Jewett jimjjewett at gmail.com
Wed Apr 27 02:30:48 CEST 2005


On 4/26/05, Robert Brewer <fumanchu at amor.org> wrote:
> [Jim]
> > Absolutely.  Even giving up the XXX_FAST optimizations would
> > still require new bytecode to not assume them.

> I'm afraid I'm only familiar with CPython, but wouldn't callee locals
> just map to XXX_FAST indices via the caller's co_names tuple?

Only if all names are in the caller's tuple.

In your example at
http://mail.python.org/pipermail/python-dev/2005-April/052924.html

two of the callees wanted a shared old_children, but that name didn't 
appear in the caller, so I wouldn't expect the compiler to make room
for it in the tuple.

-jJ


More information about the Python-Dev mailing list