The lang ref says: Names listed in a \keyword{global} statement must not be defined as formal parameters or in a \keyword{for} loop control target, \keyword{class} definition, function definition, or \keyword{import} statement. (The current implementation does not enforce the latter two restrictions, but programs should not abuse this freedom, as future implementations may enforce them or silently change the meaning of the program.) While this is all technically correct, the second paragraph is a bit misleading. The only case enforced by the compiler is that a formal parameter can't be declared global. Do we actually care about this rule? The lang ref would be shorter if it were silent on the issue, and it would more closely describe the way Python has behaved as long as I've been using it. Jeremy
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