From 240a2fd46fab69fdf27cc0fbc00dcca428144e44 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Sun, 21 Apr 2013 17:14:40 -0400 Subject: [PATCH] #15575: Clarify tutorial description of when modules are executed. --- Doc/tutorial/modules.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/tutorial/modules.rst b/Doc/tutorial/modules.rst index f5d285ec3122..bcbb761b7857 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 -- 2.47.3