> Augmented assignment does not currently automatically invoke a > "global" definition now, so why should that change no matter the > outcome of this discussion? Because of the fair user expectation that if you can write "x = x + 1" you should also be able to write "x += 1". > Is there really any need to allow anything more then replicating the > search order for variable _reference_? Code which nests sufficient > scopes that a simple 'inside-out' search is not sufficient would > just seem sorely in need of a redesign to me. . . I just realized one thing that explains why I prefer explicitly designating the scope (as in 'global x in f') over something like 'nonlocal'. It matches what the current global statement does, and it makes it crystal clear that you *can* declare a variable in a specific scope and assign to it without requiring there to be a binding for that variable in the scope itself. EIBTI when comparing these two. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4