[Python-checkins] peps: Note that __file__ is not set on the namespace package.

eric.smith python-checkins at python.org
Fri May 4 23:44:36 CEST 2012


http://hg.python.org/peps/rev/aa5f4a4b0289
changeset: 4354:aa5f4a4b0289
user: Eric V. Smith <eric at trueblade.com>
date: Fri May 04 17:44:32 2012 -0400
summary:
 Note that __file__ is not set on the namespace package.
files:
 pep-0420.txt | 5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/pep-0420.txt b/pep-0420.txt
--- a/pep-0420.txt
+++ b/pep-0420.txt
@@ -135,12 +135,11 @@
 least one directory was recorded, then a namespace package is created.
 The new namespace package:
 
- * Has a ``__file__`` attribute set to the first directory that was
- found during the scan, including the trailing path separator.
-
 * Has a ``__path__`` attribute set to the list of directories that
 were found and recorded during the scan.
 
+ * Does not have a ``__file__`` attribute.
+
 There is no mechanism to automatically recompute the ``__path__`` if
 ``sys.path`` is altered after a namespace package has already been
 created. However, existing namespace utilities (like
-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /