summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-04-21 21:14:40 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-04-21 21:14:40 (GMT)
commit240a2fd46fab69fdf27cc0fbc00dcca428144e44 (patch)
treebec46a485937bea69e1df1255e819eea7ea2af5f /Doc/tutorial
parent0729500b0194dd385fbe957bbccc8c9b5ae65f98 (diff)
downloadcpython-240a2fd46fab69fdf27cc0fbc00dcca428144e44.zip
cpython-240a2fd46fab69fdf27cc0fbc00dcca428144e44.tar.gz
cpython-240a2fd46fab69fdf27cc0fbc00dcca428144e44.tar.bz2
#15575: Clarify tutorial description of when modules are executed.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/modules.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst
index f5d285e..bcbb761 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -71,7 +71,8 @@ More on Modules
A module can contain executable statements as well as function definitions.
These statements are intended to initialize the module. They are executed only
-the *first* time the module is imported somewhere. [#]_
+the *first* time the module name is encountered in an import statement. [#]_
+(They are also run if the file is executed as a script.)
Each module has its own private symbol table, which is used as the global symbol
table by all functions defined in the module. Thus, the author of a module can