[Python-checkins] peps: Improved paragraph on __path__ recalculation. Suggested by Nick Coglan.
eric.smith
python-checkins at python.org
Fri Apr 20 12:15:17 CEST 2012
http://hg.python.org/peps/rev/305efdde744a
changeset: 4283:305efdde744a
user: Eric V. Smith <eric at trueblade.com>
date: Fri Apr 20 06:15:03 2012 -0400
summary:
Improved paragraph on __path__ recalculation. Suggested by Nick Coglan.
files:
pep-0420.txt | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/pep-0420.txt b/pep-0420.txt
--- a/pep-0420.txt
+++ b/pep-0420.txt
@@ -125,8 +125,11 @@
* Has a __path__ set to the list of directories there were found and
recorded during the scan.
-There is no mechanism to recompute the __path__ once a namespace
-package has been created.
+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
+``pkgutil.extend_path()``) can be used to update them explicitly if
+desired.
Note that if "import foo" is executed and "foo" is found as a
namespace package (using the above rules), then "foo" is immediately
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list