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 Antony.Lee
Recipients Antony.Lee, docs@python
Date 2015-12-19.22:38:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450564740.33.0.258115296695.issue25912@psf.upfronthosting.co.za>
In-reply-to
Content
There are a couple of places in the docs where it would be appropriate to replace __name__ by __spec__.__name__ in order to support the case where the module is executed as the __main__ module:

- logging.getLogger should certainly use __spec__.__name__ so that the logger hierarchy be respected (otherwise, when running "python -mpkg.subpkg", the logger of pkg.subpkg is named "__main__" and thus not a child of the "pkg" logger).

- examples for argparse.ArgumentParser (e.g. in the docs for venv) should use __spec__.__name__ instead of __name__ for the "prog=" argument.

(not guaranteed to be exhaustive)
History
Date User Action Args
2015-12-19 22:39:00Antony.Leesetrecipients: + Antony.Lee, docs@python
2015-12-19 22:39:00Antony.Leesetmessageid: <1450564740.33.0.258115296695.issue25912@psf.upfronthosting.co.za>
2015-12-19 22:39:00Antony.Leelinkissue25912 messages
2015-12-19 22:38:59Antony.Leecreate