Note that ImportError will no longer be raised due to a missing __init__.py file.

This commit is contained in:
Eric V. Smith 2012-04-19 18:56:22 -04:00
parent 97b3e45cff
commit 2cc4d29794
1 changed files with 5 additions and 0 deletions

View File

@ -148,6 +148,11 @@ loading of the package can take place once it is located along the
path. With namespace packages, all entries in the path must be
scanned.
Note that an ImportError will no longer be raised for a directory
lacking an ``__init__.py`` file. Such a directory will now be imported
as a namespace package, whereas in prior Python versions an
ImportError would be raised.
At PyCon 2012, we had a discussion about namespace packages at which
PEP 382 and PEP 402 were rejected, to be replaced by this PEP [1]_.