From: Georg Brandl Date: Fri, 9 May 2008 06:39:58 +0000 (+0000) Subject: Add a note about using reload(). X-Git-Tag: v2.6b1~557 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68fd63ba9ad7d7677edcdf6d9d115e7bf830028d;p=thirdparty%2FPython%2Fcpython.git Add a note about using reload(). --- diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst index 6e45f64227a2..975e13eb6b3b 100644 --- a/Doc/tutorial/modules.rst +++ b/Doc/tutorial/modules.rst @@ -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: