Author dmugtasimov
Recipients brett.cannon, dmugtasimov, docs@python, ncoghlan
Date 2013-01-08.14:12:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1357654363.9.0.534817595782.issue16891@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-01-08 14:12:43dmugtasimovsetrecipients: + dmugtasimov, brett.cannon, ncoghlan, docs@python
2013-01-08 14:12:43dmugtasimovsetmessageid: <1357654363.9.0.534817595782.issue16891@psf.upfronthosting.co.za>
2013-01-08 14:12:43dmugtasimovlinkissue16891 messages
2013-01-08 14:12:43dmugtasimovcreate