[Python-Dev] Some comments on PEP 328 (absolute/relative imports) (original) (raw)
Guido van Rossum guido at python.org
Wed Apr 7 00:14:21 EDT 2004
- Previous message: [Python-Dev] Some comments on PEP 328 (absolute/relative imports)
- Next message: [Python-Dev] Python is faster than C
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Done. Seems that the final remaining issue is the meaning of "." inside init.py -- does it refer to the current package or the parent? Guido, if you don't want to Pronounce, I'll post to c.l.py requesting feedback.
It ought to refer to the current package. After all, in init.py, relative imports (today) also work the same way as inside other modules of that package.
init.py is funny that way (funny strange, not funny ha ha :-): its dict namespace is that of the package, i.e. the parent of the package's submodules; but its location in the package tree is equivalent to that of a submodule of the package. That's just how it is, and once you think about it long enough that's the only way it can be.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Some comments on PEP 328 (absolute/relative imports)
- Next message: [Python-Dev] Python is faster than C
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]