summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorJulien Palard <julien@palard.fr>2019-09-12 13:19:06 (GMT)
committerStéphane Wirtel <stephane@wirtel.be>2019-09-12 13:19:06 (GMT)
commita45b0efdeaf27c3f8a630fb8c3670df6f0d42d20 (patch)
tree5944cab94d787a727da749b6be1334ccc1a54897 /Doc/reference
parented4b3216e59df4806e5ef63b3357fc577a9443d7 (diff)
downloadcpython-a45b0efdeaf27c3f8a630fb8c3670df6f0d42d20.zip
cpython-a45b0efdeaf27c3f8a630fb8c3670df6f0d42d20.tar.gz
cpython-a45b0efdeaf27c3f8a630fb8c3670df6f0d42d20.tar.bz2
Doc: Add -m reference in context of code execution (GH-16045)
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/executionmodel.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst
index 49cb86b..55ac01b 100644
--- a/Doc/reference/executionmodel.rst
+++ b/Doc/reference/executionmodel.rst
@@ -22,7 +22,9 @@ The following are blocks: a module, a function body, and a class definition.
Each command typed interactively is a block. A script file (a file given as
standard input to the interpreter or specified as a command line argument to the
interpreter) is a code block. A script command (a command specified on the
-interpreter command line with the :option:`-c` option) is a code block. The string
+interpreter command line with the :option:`-c` option) is a code block.
+A module run as a top level script (as module ``__main__``) from the command
+line using a :option:`-m` argument is also a code block. The string
argument passed to the built-in functions :func:`eval` and :func:`exec` is a
code block.