On 7 ene, 16:13, John Nagle <[EMAIL PROTECTED]> wrote: > Because Python doesn't have explicit declarations, scope of variables is > a touchy issue. If you write "x = 1" within a function, that will > create a local "x" if "x" doesn't exist, or alter a global "x" if "x" was > previously created in the global context. But at least global variables > are local to the namespace; we don't have clashes across files. No, `x=1` always uses a local variable x, unless an (explicit!) global statement was in effect in the same block. This, and the explicit self, make very clear which x you are referring to.
-- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list