gh-110138: Improve grammar in idiomatic usage of `__main__.py` (#110142)

This commit is contained in:
Quentin Agren 2023-10-01 14:32:43 -04:00 committed by GitHub
parent 31097df611
commit adf0f15a06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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