New submission from Géry <gery.o...@gmail.com>:

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/`).

----------
assignee: docs@python
components: Documentation
messages: 360682
nosy: docs@python, maggyero
priority: normal
pull_requests: 17565
severity: normal
status: open
title: Improve the __main__ module documentation
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to