mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-39452: Rewrite and expand __main__.rst (#26883)
Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``. Co-authored-by: Géry Ogam <gery.ogam@gmail.com> Co-authored-by: Éric Araujo <merwok@netwok.org> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
a24676bedc
commit
7cba23164c
5 changed files with 369 additions and 17 deletions
|
@ -975,6 +975,8 @@ should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is
|
|||
not a valid expression.
|
||||
|
||||
|
||||
.. _import-dunder-main:
|
||||
|
||||
Special considerations for __main__
|
||||
===================================
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue