Fredrik Lundh <[EMAIL PROTECTED]> writes:

>> It also allows to put globals in an array instead of a dictionary,
>> making them as fast as locals.
>
> so module namespaces will no longer be populated by *executing* the 
> module contents?

They would, but the set of global names except 'from module import *'
(which would need a slower lookup mechanism) could be determined
without executing it.

> what would happen if you tried to execute the following code?
>
>     def foo():
>        bar()
>
>     def bar():
>        pass

Depends on the semantics of var. I presented 3 choices.

My favorite choice is #3, for all bindings: the variable is visible in
the whole scope in which it is defined, but accessing it before its
definition has executed is an error. (Other choices are not practical
for functions.)

This means that the behavior of this code is the same as in current
Python.

-- 
   __("<         Marcin Kowalczyk
   \__/       [EMAIL PROTECTED]
    ^^     http://qrnik.knm.org.pl/~qrczak/
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to