Marcin 'Qrczak' Kowalczyk wrote:
> 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.
That would be a pretty big semantic change from Python <3000. e.g.
if sys.platform.startswith('win32'):
import win32api
def get_filesystem_roots():
return win32api.GetLogicalDrives()
else:
def get_filesystem_roots():
return ['/']
How do I statically determine if win32api is a global or not? Do I have
to declare it? Also, what happens in the presence of "exec" statements?
Cheers,
Brian
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com