Matthias, thank you for your explanation. I was operating under the assumption that the mechanism behind "from package import module" was somehow different from that behind "from module import name", because there is no name "module" inside package/__init__.py. A little experimentation confirmed that it was a mistaken assumption. Now all is clear. The note in section 6.12 ("The import statement") of the Language Reference, "XXX Can't be bothered to spell this out right now", has always bothered me. I will endeavour to flesh it out for release 2.3. Perhaps Guido's package support essay (http://www.python.org/doc/essays/packages.html), edited, should form a new section or appendix. Ideas anyone? -- David Goodger <goodger@users.sourceforge.net> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/
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