Le Thu, 12 Mar 2009 11:13:33 -0400,
Kent Johnson <ken...@tds.net> s'exprima ainsi:

> Because local name lookup is faster than global name lookup. Local
> variables are stored in an array in the stack frame and accessed by
> index. Global names are stored in a dict and accessed with dict access
> (dict.__getitem__()).

? I thought this was mainly because a name has first to be searched 
(unsuccessfully) locally before a global lookup is launched.
Also, are locals really stored in an array? How does lookup then proceed? Is it 
a kind of (name,ref) sequence?

Denis
------
la vita e estrany
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to