Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe0e108

Browse files
committed
#15104: add backtick code markup.
1 parent afb151a commit fe0e108

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Doc/library/__main__.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
.. module:: __main__
66
:synopsis: The environment where the top-level script is run.
77

8-
'__main__' is the name of the scope in which top-level code executes.
9-
A module's __name__ is set equal to '__main__' when read from
8+
``'__main__'`` is the name of the scope in which top-level code executes.
9+
A module's __name__ is set equal to ``'__main__'`` when read from
1010
standard input, a script, or from an interactive prompt.
1111

1212
A module can discover whether or not it is running in the main scope by
13-
checking its own __name__, which allows a common idiom for conditionally
14-
executing code in a module when it is run as a script or with `python
15-
-m` but not when it is imported:
13+
checking its own ``__name__``, which allows a common idiom for conditionally
14+
executing code in a module when it is run as a script or with ``python
15+
-m`` but not when it is imported:
1616

1717
if __name__ == "__main__":
1818
# execute only if run as a script
1919
main()
2020

2121
For a package, the same effect can be achieved by including a
22-
__main__.py module, the contents of which will be executed when the
23-
module is run with -m.
22+
``__main__.py`` module, the contents of which will be executed when the
23+
module is run with ``-m``.

0 commit comments

Comments
 (0)