> What is the rationale given for not allowing: > > import .moduleY > > as a relative import statement meaning "from the package containing the > module running the import statement, import moduleY"? Probably because it's not clear what name to bind the imported module to, and in what namespace. With the current import syntax, you refer to the imported module using exactly the same name (or dotted sequence of names) that you used when importing, but that's not possible in this case, because ".moduleY" is not a valid Python expression. 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