]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 2 Oct 2023 10:03:12 +0000 (03:03 -0700)
committerGitHub <noreply@github.com>
Mon, 2 Oct 2023 10:03:12 +0000 (12:03 +0200)
gh-110138: Improve grammar in idiomatic usage of ``__main__.py`` (GH-110142)
(cherry picked from commit adf0f15a06c6e8ddd1a6d59b28efcbb26289f080)

Co-authored-by: Quentin Agren <quentin.agren@gmail.com>
Doc/library/__main__.rst

index fd60d92d4eb0f94fc789350b25948b1c21657770..d378e40b3906c69e44622e18411cd04e39b2467c 100644 (file)
@@ -238,9 +238,9 @@ package.  For more details, see :ref:`intra-package-references` in the
 Idiomatic Usage
 ^^^^^^^^^^^^^^^
 
-The contents of ``__main__.py`` typically isn't fenced with
-``if __name__ == '__main__'`` blocks.  Instead, those files are kept short,
-functions to execute from other modules.  Those other modules can then be
+The content of ``__main__.py`` typically isn't fenced with an
+``if __name__ == '__main__'`` block.  Instead, those files are kept
+short and import functions to execute from other modules.  Those other modules can then be
 easily unit-tested and are properly reusable.
 
 If used, an ``if __name__ == '__main__'`` block will still work as expected