[docs] [issue16891] Fix docs about module search order
Dmitry Mugtasimov
report at bugs.python.org
Tue Jan 8 15:12:43 CET 2013
Dmitry Mugtasimov added the comment:
As I investigate it a little closer it seems to me that it is not a documentation issue, but an implementation issue.
http://docs.python.org/2/reference/simple_stmts.html#import
"A package can contain other packages and modules while modules cannot contain other modules or packages."
The only why to import name from module is
from xyz import b
where "b" is name defined inside xyz module.
Issuing
import xyz.b
means that "b" is module or package.
Therefore xyz cannot be a module, since "...modules cannot contain other modules or packages." This means that xyz is package.
The problem is that it is considered as module for case:
python t.py
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16891>
_______________________________________
More information about the docs
mailing list