https://github.com/python/cpython/commit/17249f3a8fce233d4cb0f371d9978e281315bc46 commit: 17249f3a8fce233d4cb0f371d9978e281315bc46 branch: 3.12 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: hugovk <1324225+hug...@users.noreply.github.com> date: 2024-09-06T11:08:32+03:00 summary:
[3.12] gh-103066: Add links and `help` in site.py constants (GH-103777) (#123763) Co-authored-by: David Caron <dcaro...@gmail.com> Co-authored-by: Terry Jan Reedy <tjre...@udel.edu> Co-authored-by: Ćukasz Langa <luk...@langa.pl> Co-authored-by: Serhiy Storchaka <storch...@gmail.com> Co-authored-by: Alex Waygood <alex.wayg...@gmail.com> files: M Doc/library/constants.rst M Doc/library/site.rst diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst index 93a7244f87de6b..3eceecc4e0a736 100644 --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -79,6 +79,8 @@ A small number of constants live in the built-in namespace. They are: :exc:`SyntaxError`), so they can be considered "true" constants. +.. _site-consts: + Constants added by the :mod:`site` module ----------------------------------------- @@ -94,6 +96,13 @@ should not be used in programs. (i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the specified exit code. +.. data:: help + :noindex: + + Object that when printed, prints the message "Type help() for interactive + help, or help(object) for help about object.", and when called, + acts as described :func:`elsewhere <help>`. + .. data:: copyright credits diff --git a/Doc/library/site.rst b/Doc/library/site.rst index f5cf81fb1c9a17..514eed314ea65f 100644 --- a/Doc/library/site.rst +++ b/Doc/library/site.rst @@ -15,8 +15,9 @@ import can be suppressed using the interpreter's :option:`-S` option. .. index:: triple: module; search; path -Importing this module will append site-specific paths to the module search path -and add a few builtins, unless :option:`-S` was used. In that case, this module +Importing this module normally appends site-specific paths to the module search path +and adds :ref:`callables <site-consts>`, including :func:`help` to the built-in +namespace. However, Python startup option :option:`-S` blocks this and this module can be safely imported with no automatic modifications to the module search path or additions to the builtins. To explicitly trigger the usual site-specific additions, call the :func:`main` function. _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com