]> granicus.if.org Git - python/commitdiff
Doc: Add -m reference in context of code execution (GH-16045)
authorJulien Palard <julien@palard.fr>
Thu, 12 Sep 2019 13:19:06 +0000 (15:19 +0200)
committerStéphane Wirtel <stephane@wirtel.be>
Thu, 12 Sep 2019 13:19:06 +0000 (14:19 +0100)
Doc/reference/executionmodel.rst

index 49cb86b56084d34fb595b32a8ad7b4a80cdfb38d..55ac01b6a844dcef91ea7358fbfe9781ee4cc63a 100644 (file)
@@ -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.