[docs] Unclear language in __main__ description (issue 15104)

rdmurray at bitdance.com rdmurray at bitdance.com
Mon Apr 14 18:01:10 CEST 2014


http://bugs.python.org/review/15104/diff/11565/Doc/library/__main__.rst
File Doc/library/__main__.rst (right):

http://bugs.python.org/review/15104/diff/11565/Doc/library/__main__.rst#newcode8
Doc/library/__main__.rst:8: __main__ is the name of the scope in which
top-level code executes.
Since this is the name, it should be in quotes.

http://bugs.python.org/review/15104/diff/11565/Doc/library/__main__.rst#newcode9
Doc/library/__main__.rst:9: A module's __name__ becomes equal to
'__main__' when read from
I think "is set equal to" would be better here.

http://bugs.python.org/review/15104/diff/11565/Doc/library/__main__.rst#newcode12
Doc/library/__main__.rst:12: A module can discover whether or not it is
the __main__ module by
'whether or not it is running in the main scope' would probably be more
accurate and consistent with the previous wording.  (A 'script' file can
also be a non-__main__ module if it is imported, which is the point of
the 'if' phrase.)

http://bugs.python.org/review/15104/diff/11565/Doc/library/__main__.rst#newcode21
Doc/library/__main__.rst:21: Alternatively, a package may include a
__main__.py module, the
I don't think this is an 'alternatively'.  How about, "For a package,
the same effect can be achieved by including a __main__.py module".

http://bugs.python.org/review/15104/


More information about the docs mailing list