> import P.Q (1) > from P.Q import X (2) > > would only look for P in sys.path (I'll call this "absolute import"); > and > > from ...P.Q import X (3) > > would scan for P upwards from the current package. > > I think this addresses all the concerns I've seen brought up in this > thread so far No, it doesn't address my concern that scan-upwards semantics should be the default, in the sense of being what should be used in the absence of a reason to do otherwise, and should therefore have the most straightforward syntax. Also, you don't seem to have anything for the explicitly-relative case, which might not be strictly necessary, but I think I'd feel more comfortable if it were available somehow. Thinking about the double_underscore names, it might not be so bad if they were a bit shorter, e.g. A: __root__.P.Q B: __here__.P.Q __here__.__parent__.P.Q C: P.Q Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
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