Diez B. Roggisch wrote: > Interesting. How is the index computed? I would have assumed that locals() > is somehow used, which is a dicht. > > I can imagine enumerating left-hand-side names and trying to replace their > occurence with the index, falling back to the name if that is not > possible/the index isn't found. Does that come close?
yes, but there is no fallback: if a name inside a function is local or not is decided once and for all by the compiler, using static analysis. see: http://pyref.infogami.com/naming-and-binding </F> -- http://mail.python.org/mailman/listinfo/python-list