summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorJack DeVries <58614260+jdevries3133@users.noreply.github.com>2021-08-24 17:01:41 (GMT)
committerGitHub <noreply@github.com>2021-08-24 17:01:41 (GMT)
commit7cba23164cf82f6619db002cd30021b5dfb1f809 (patch)
tree21b0324f3a913384ca8c88578ff25bca3119a392 /Doc/reference
parenta24676bedcd332dd7e6fa5521d0449206391d190 (diff)
downloadcpython-7cba23164cf82f6619db002cd30021b5dfb1f809.zip
cpython-7cba23164cf82f6619db002cd30021b5dfb1f809.tar.gz
cpython-7cba23164cf82f6619db002cd30021b5dfb1f809.tar.bz2
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>
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/import.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/reference/import.rst b/Doc/reference/import.rst
index 81a124f..39fcba0 100644
--- a/Doc/reference/import.rst
+++ b/Doc/reference/import.rst
@@ -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__
===================================