[Python-checkins] peps: Improved wording on regular package performance.

eric.smith python-checkins at python.org
Tue May 1 16:55:40 CEST 2012


http://hg.python.org/peps/rev/4f0334a2e532
changeset:   4340:4f0334a2e532
user:        Eric V. Smith <eric at trueblade.com>
date:        Tue May 01 10:55:21 2012 -0400
summary:
  Improved wording on regular package performance.

files:
  pep-0420.txt |  13 +++++++------
  1 files changed, 7 insertions(+), 6 deletions(-)


diff --git a/pep-0420.txt b/pep-0420.txt
--- a/pep-0420.txt
+++ b/pep-0420.txt
@@ -172,12 +172,13 @@
 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

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list