Improved wording on regular package performance.
This commit is contained in:
parent
0127444359
commit
e426a1f29e
13
pep-0420.txt
13
pep-0420.txt
|
@ -172,12 +172,13 @@ Discussion
|
|||
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]_.
|
||||
|
||||
There is no intention to remove support of regular packages. If there
|
||||
is no intention that a package is a namespace package, then there is a
|
||||
performance advantage to it being a regular package. Creation and
|
||||
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.
|
||||
There is no intention to remove support of regular packages. If a
|
||||
developer knows that her package will never be a portion of a
|
||||
namespace package, then there is a performance advantage to it being a
|
||||
regular package (with an ``__init__.py``). Creation and loading of a
|
||||
regular package can take place immediately when it is located along
|
||||
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
|
||||
lacking an ``__init__.py`` file. Such a directory will now be
|
||||
|
|
Loading…
Reference in New Issue