This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maggyero
Recipients docs@python, maggyero
Date 2020-01-25.14:00:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org>
In-reply-to
Content
This PR will apply the following changes on the [`__main__` module documentation](https://docs.python.org/3.7/library/__main__.html):

- correct the phrase "run as script" by "run from the file system" (as used in the [`runpy`](https://docs.python.org/3/library/runpy.html) documentation) since "run as script" does not mean the intended `python foo.py` but `python -m foo` (cf. [PEP 338](https://www.python.org/dev/peps/pep-0338/));
- replace the phrase "run with `-m`" by "run from the module namespace" (as used in the [`runpy`](https://docs.python.org/3/library/runpy.html) documentation) since the module can be equivalently run with `runpy.run_module('foo')` instead of `python -m foo`;
- make the block comment [PEP 8](https://www.python.org/dev/peps/pep-0008/#comments)-compliant (located before the `if` block, capital initialised, period ended);
- add a missing case for which a package's \_\_main\_\_.py is executed (when the package is run from the file system: `python foo/`).
History
Date User Action Args
2020-01-25 14:00:07maggyerosetrecipients: + maggyero, docs@python
2020-01-25 14:00:07maggyerosetmessageid: <1579960807.69.0.285569916248.issue39452@roundup.psfhosted.org>
2020-01-25 14:00:07maggyerolinkissue39452 messages
2020-01-25 14:00:07maggyerocreate