summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-11-13 20:36:44 (GMT)
committerGitHub <noreply@github.com>2021-11-13 20:36:44 (GMT)
commit28326ac5f87ede140268376f0c87c3b2aba62906 (patch)
treed1e4e22a0c6b473d3d24020ff57c98642cc262b2 /Doc
parented55426acd58f030ccc0cf1297e66078f538797c (diff)
downloadcpython-28326ac5f87ede140268376f0c87c3b2aba62906.zip
cpython-28326ac5f87ede140268376f0c87c3b2aba62906.tar.gz
cpython-28326ac5f87ede140268376f0c87c3b2aba62906.tar.bz2
bpo-45799: [Doc] improve confusing sentence in __main__.rst (GH-29546)
I was reading this bit last night and thought it was a typo. In the light of day, I realized it wasn't *technically* a typo, but definitely confusing wording. This PR fixes the confusing sentence. Automerge-Triggered-By: GH:ericvsmith (cherry picked from commit f8da00ef04fdadf7cd9821e8ec4b317ecf3ed663) Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/__main__.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/__main__.rst b/Doc/library/__main__.rst
index d92266e..c5f36a7 100644
--- a/Doc/library/__main__.rst
+++ b/Doc/library/__main__.rst
@@ -116,8 +116,8 @@ Idiomatic Usage
^^^^^^^^^^^^^^^
Some modules contain code that is intended for script use only, like parsing
-command-line arguments or fetching data from standard input. When a module
-like this were to be imported from a different module, for example to unit test
+command-line arguments or fetching data from standard input. If a module
+like this was imported from a different module, for example to unit test
it, the script code would unintentionally execute as well.
This is where using the ``if __name__ == '__main__'`` code block comes in