diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-05-22 21:36:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-22 21:36:19 (GMT) |
commit | 3d3b189f8ef321ccfb144a46d50892939d6004aa (patch) | |
tree | 90948faf2f272d6e633c81ca9879d8917e249615 /Doc/reference | |
parent | 54af41d42eebbe4c6afe6b34ebb0fb550de1e7ba (diff) | |
download | cpython-3d3b189f8ef321ccfb144a46d50892939d6004aa.zip cpython-3d3b189f8ef321ccfb144a46d50892939d6004aa.tar.gz cpython-3d3b189f8ef321ccfb144a46d50892939d6004aa.tar.bz2 |
[3.6] bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail (GH-1725) (GH-1727)
(cherry picked from commit 43c8a9e39bb2d4f25ed7ae17a55f34e375d1868b)
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/executionmodel.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/reference/executionmodel.rst b/Doc/reference/executionmodel.rst index f0dbbd1..d08abdf 100644 --- a/Doc/reference/executionmodel.rst +++ b/Doc/reference/executionmodel.rst @@ -164,15 +164,6 @@ Builtins and restricted execution .. index:: pair: restricted; execution -The builtins namespace associated with the execution of a code block is actually -found by looking up the name ``__builtins__`` in its global namespace; this -should be a dictionary or a module (in the latter case the module's dictionary -is used). By default, when in the :mod:`__main__` module, ``__builtins__`` is -the built-in module :mod:`builtins`; when in any other module, -``__builtins__`` is an alias for the dictionary of the :mod:`builtins` module -itself. ``__builtins__`` can be set to a user-created dictionary to create a -weak form of restricted execution. - .. impl-detail:: Users should not touch ``__builtins__``; it is strictly an implementation @@ -180,6 +171,15 @@ weak form of restricted execution. :keyword:`import` the :mod:`builtins` module and modify its attributes appropriately. +The builtins namespace associated with the execution of a code block +is actually found by looking up the name ``__builtins__`` in its +global namespace; this should be a dictionary or a module (in the +latter case the module's dictionary is used). By default, when in the +:mod:`__main__` module, ``__builtins__`` is the built-in module +:mod:`builtins`; when in any other module, ``__builtins__`` is an +alias for the dictionary of the :mod:`builtins` module itself. + + .. _dynamic-features: Interaction with dynamic features |