This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author shai
Recipients shai
Date 2013-02-02.22:41:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Consider the following directory structure:


Now, in Python (I checked 2.7.3 and 3.2.3, haven't seen the issue mentioned anywhere so I suspect it is also in later Pythons), if you import a.b, you always get the package (that is, the b folder), and the module ( is silently ignored. I tested by putting the line """print("I'm a package")""" in a/b/ and """print("I'm a module")""" in a/

This becomes a real problem with tools which find modules dynamically, like test harnesses.

I'd expect that in such cases, Python should "avoid the temptation to guess", and raise an ImportError.

Thanks, Shai.
Date User Action Args
2013-02-02 22:41:08shaisetrecipients: + shai
2013-02-02 22:41:08shaisetmessageid: <>
2013-02-02 22:41:08shailinkissue17108 messages
2013-02-02 22:41:08shaicreate