Improved wording on regular package performance.

This commit is contained in:
Eric V. Smith 2012-05-01 10:55:21 -04:00
parent 0127444359
commit e426a1f29e
1 changed files with 7 additions and 6 deletions

View File

@ -172,12 +172,13 @@ Discussion
At PyCon 2012, we had a discussion about namespace packages at which 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 [2]_. PEP 382 and PEP 402 were rejected, to be replaced by this PEP [2]_.
There is no intention to remove support of regular packages. If there There is no intention to remove support of regular packages. If a
is no intention that a package is a namespace package, then there is a developer knows that her package will never be a portion of a
performance advantage to it being a regular package. Creation and namespace package, then there is a performance advantage to it being a
loading of the package can take place once it is located along the regular package (with an ``__init__.py``). Creation and loading of a
path. With namespace packages, all entries in the path must be regular package can take place immediately when it is located along
scanned. the path. With namespace packages, all entries in the path must be
scanned before the package is created.
Note that an ImportWarning will no longer be raised for a directory Note that an ImportWarning will no longer be raised for a directory
lacking an ``__init__.py`` file. Such a directory will now be lacking an ``__init__.py`` file. Such a directory will now be