]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a note about using reload().
authorGeorg Brandl <georg@python.org>
Fri, 9 May 2008 06:39:58 +0000 (06:39 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 9 May 2008 06:39:58 +0000 (06:39 +0000)
Doc/tutorial/modules.rst

index 6e45f64227a27cf81dd3c3e7b18ceb44292ccdfd..975e13eb6b3b80d4df12355d633daba589200caf 100644 (file)
@@ -103,6 +103,13 @@ There is even a variant to import all names that a module defines::
 
 This imports all names except those beginning with an underscore (``_``).
 
+.. note::
+
+   For efficiency reasons, each module is only imported once per interpreter
+   session.  Therefore, if you change your modules, you must restart the
+   interpreter -- or, if it's just one module you want to test interactively,
+   use :func:`reload`, e.g. ``reload('modulename')``.
+
 
 .. _tut-modulesasscripts: