summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-04-21 20:59:04 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-04-21 20:59:04 (GMT)
commitca3f29413e0e35d01108ff128ed40549cf589983 (patch)
treef1f07d0f49628c9939ac3677d560299478a695ac /Doc/tutorial
parent7503b4f463867957e67509f1e742c3d7b33e3289 (diff)
parent25187e666b5fa53b7d2b1eeeb318f1267d87de13 (diff)
downloadcpython-ca3f29413e0e35d01108ff128ed40549cf589983.zip
cpython-ca3f29413e0e35d01108ff128ed40549cf589983.tar.gz
cpython-ca3f29413e0e35d01108ff128ed40549cf589983.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 fbcbe52..99e15bc 100644
--- a/Doc/tutorial/modules.rst
+++ b/Doc/tutorial/modules.rst
@@ -72,7 +72,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