Ping> The question is, what behaviour is preferable for this code:

    Ping>     g = 1
    Ping>     def f():
    Ping>         g += 1

    Ping>     f()

If you treat "g += 1" as "g = g + 1" then it should create a local variable
with a value of 2.  There being no global statement in f() it must not
modify the global variable.

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to