> Other issues: > > + Make "global x" textually following any reference to x (in the > same scope) a compile-time error. Unclear whether > > def f(): > global x > global x > > is an error under that rule (i.e., does appearance in a global > stmt constitute "a reference"?). Ditto for > > def f(): > global x, x > > My opinion: declarations aren't references, and redundant > declarations don't hurt (so "no, not an error" to both). > > Change Ref Man accordingly (i.e., this plugs a hole in the > *language* defn, it's not just a question of implementation > accident du jour anymore). Agreed. > + Spew warning for "import *" and "exec" at function scope, or > change Ref Man to spell out when this is and isn't guaranteed > to work. Ah, yes! A warning! That would be great! > Guido appeared to agree with both of those. Can't recall when we discussed these, but yes, after some introspection I still appear to agree. --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