[issue15104] abusive language in __name__ description
New submission from anatoly techtonik
Hynek Schlawack
anatoly techtonik
anatoly techtonik
Martin v. Löwis
anatoly techtonik
Martin v. Löwis
Martin v. Löwis
anatoly techtonik
R. David Murray
Changes by Ezio Melotti
Terry J. Reedy
Changes by Ezio Melotti
Changes by Mike Hoy
Changes by Hynek Schlawack
Changes by Eric Snow
Sam Lucidi added the comment:
I've attempted to synthesize the ideas in this thread into a clearer explanation of __main__. What I've written doesn't attempt to explain anything else about module naming, but it does try to address the common package and module uses of __main__.
----------
keywords: +patch
nosy: +mansam
Added file: http://bugs.python.org/file34820/clarify-__main__-documentation.patch
_______________________________________
Python tracker
R. David Murray added the comment:
I've made some review comments.
----------
_______________________________________
Python tracker
Changes by R. David Murray
Sam Lucidi added the comment:
Thanks, I've revised the change based on your comments.
----------
Added file: http://bugs.python.org/file34822/clarify-__main__-documentation.patch
_______________________________________
Python tracker
Changes by Sam Lucidi
Roundup Robot added the comment:
New changeset 4f23648b7c97 by R David Murray in branch '3.4':
#15104: improve the discussion of __main__.
http://hg.python.org/cpython/rev/4f23648b7c97
New changeset 94ac365bf1b7 by R David Murray in branch 'default':
Merge: #15104: improve the discussion of __main__.
http://hg.python.org/cpython/rev/94ac365bf1b7
----------
nosy: +python-dev
_______________________________________
Python tracker
R. David Murray added the comment:
Thanks, Sam. I did not apply this to 2.7 because I'm not sure if the __main__.py is supported there. Can someone check?
----------
type: enhancement -> behavior
versions: -Python 3.4, Python 3.5
_______________________________________
Python tracker
R. David Murray added the comment:
Thanks, Sam. I did not apply this to 2.7 because I'm not sure if the __main__.py is supported there. Can someone check?
----------
_______________________________________
Python tracker
Changes by R. David Murray
Terry J. Reedy added the comment:
I am a bit puzzled. According to
https://docs.python.org/2.7/using/cmdline.html#interface-options __main__.py (not indexed) has been supported since 2.5. On the other hand, recursively grepping Lib for 'e' in __main__.py files hits about 20 files in 3.4 but only 2 in 2.7. Moreover, those two files fail for trying to do relative imports: "from .main import main, TestProgram, USAGE_AS_MAIN".
----------
_______________________________________
Python tracker
Roundup Robot added the comment:
New changeset 008486e18e90 by R David Murray in branch '3.4':
#15104: add backtick code markup.
http://hg.python.org/cpython/rev/008486e18e90
New changeset 14e874736d3a by R David Murray in branch 'default':
Merge: #15104: add backtick code markup.
http://hg.python.org/cpython/rev/14e874736d3a
----------
_______________________________________
Python tracker
Éric Araujo added the comment:
Docs and indexing/cross-links in 2.7 should indeed be improved. I had forgotten which of 2.6 or 2.7 added support for executing packages thanks to __main__.py files and the docs don't contain an answer that's comprehensive and easy to find.
----------
assignee: docs@python -> eric.araujo
nosy: +eric.araujo
stage: patch review -> needs patch
_______________________________________
Python tracker
Irit Katriel
participants (12)
-
anatoly techtonik
-
Eric Snow
-
Ezio Melotti
-
Hynek Schlawack
-
Irit Katriel
-
Martin v. Löwis
-
Mike Hoy
-
R. David Murray
-
Roundup Robot
-
Sam Lucidi
-
Terry J. Reedy
-
Éric Araujo