> Likewise, the following should be illegal: > > def f(): > x = 12 > y = 1 > def g(): > global y in f > y = 12 > g() > print locals() > > because the global statement occurs after a local binding of the name. Huh? The placement of a global statement is irrelevant -- it can occur anywhere in the scope. This should certainly work. --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