[Python-Dev] 2.5 and beyond
skip at pobox.com
skip at pobox.com
Fri Jun 30 13:33:03 CEST 2006
More information about the Python-Dev mailing list
Fri Jun 30 13:33:03 CEST 2006
- Previous message: [Python-Dev] 2.5 and beyond
- Next message: [Python-Dev] 2.5 and beyond
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] 2.5 and beyond
- Next message: [Python-Dev] 2.5 and beyond
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list