On Mon, 12 Jul 2010 22:57:10 +0200, Alf P. Steinbach /Usenet wrote: > Existence of a variable means, among other things, that > > * You can use the value, with guaranteed effect (either unassigned > exception > or you get a proper value): in particular, you won't be accessing a > global if you're using the name of a local declared by a later > assignment.
That is too strong. Given the global code: x (where x doesn't exist in the global namespace, and therefore does not exist, as you agreed earlier) Python promises to raise NameError. By the above definition, this counts as "variable x exists". But surely that is undesirable -- that implies that *all* variables exist. Even $...@*@( is a variable that exists, as that is guaranteed to raise SyntaxError. -- Steven -- http://mail.python.org/mailman/listinfo/python-list