[Python-checkins] peps: Add a note that a namespace package is not a different type of package, but a

eric.smith python-checkins at python.org
Wed Apr 25 19:52:40 CEST 2012


http://hg.python.org/peps/rev/6eff72fe26b6
changeset:   4309:6eff72fe26b6
user:        Eric V. Smith <eric at trueblade.com>
date:        Wed Apr 25 13:52:33 2012 -0400
summary:
  Add a note that a namespace package is not a different type of package, but a new way of creating a package.

files:
  pep-0420.txt |  8 ++++++++
  1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/pep-0420.txt b/pep-0420.txt
--- a/pep-0420.txt
+++ b/pep-0420.txt
@@ -141,6 +141,14 @@
 created as a package.  The creation of the namespace package is not
 deferred until a sub-level import occurs.
 
+A namespace package is not fundamentally different from a regular
+package. It is just a different way of creating packages. Once a
+namespace package is created, there is no functional difference
+between it and a regular package. The only observable difference is
+that the namespace package's ``__file__`` attribute will end with a
+path separator (typically a slash or backslash, depending on the
+platform).
+
 Impact on Import Finders and Loaders
 ------------------------------------
 

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


More information about the Python-checkins mailing list