Eric Snow added the comment:

> By the way,...

Yeah, PEP 420 (implemented in 3.3) introduced namespace packages.  The new 
behavior you're thinking of is where a package doesn't need a __init__.py.  So 
path-based lookup for modules, the order goes like this (for "import 
spam.eggs"):

1. look for a directory named "spam" with a __init__.py,
2. look for a file named spam.py,
3. look for a directory named "spam" (becomes an namespace package),
4. raise ImportError (used to be step 3).

Once spam gets loaded, spam.eggs gets imported...

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to