mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
#15575: Clarify tutorial description of when modules are executed.
This commit is contained in:
commit
ca3f29413e
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue