"Marcin 'Qrczak' Kowalczyk" <[EMAIL PROTECTED]> wrote: > > Josiah Carlson <[EMAIL PROTECTED]> writes: > > > From what I can tell, the only thing that your 'var' keyword does is > > ambiguate the global vs. local case, > > No, it can select between any of outer scopes.
No. It can't select between *any* of the outer scopes, only those scopes that have previously existing *names* that one wants to modify, and really, only the deepest nested scope with a 'var' declaration. It is no better, semantically, then just using a list. In fact, by virtue of breaking currently working code, and making it visually ambiguous, it is worse. As Jim Jewett stated, using a list "is at least strange enough to warn people that they need to read carefully." > It also allows to put globals in an array instead of a dictionary, > making them as fast as locals. No, it doesn't. import foo #foo.a didn't exist before foo.a = x #foo.a exists now This kind of thing was stated in the earlier thread about making globals as fast as locals. - Josiah _______________________________________________ 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