diff options
author | Anthony Shaw <anthony.p.shaw@gmail.com> | 2019-06-01 15:51:58 (GMT) |
---|---|---|
committer | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2019-06-01 15:51:58 (GMT) |
commit | 059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d (patch) | |
tree | 2b0fa9d7650fb6693f2e50c21dbce19db068832d | |
parent | 66501058fef76a5d77e6879f6da3282f0a9eef1b (diff) | |
download | cpython-059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d.zip cpython-059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d.tar.gz cpython-059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d.tar.bz2 |
bpo-31968: Documentation -- add clarification on the globals dict for exec() (GH-13140)
-rw-r--r-- | Doc/library/functions.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 7170a78..425a985 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -499,7 +499,8 @@ are always available. They are listed here in alphabetical order. :func:`exec` function. The return value is ``None``. In all cases, if the optional parts are omitted, the code is executed in the - current scope. If only *globals* is provided, it must be a dictionary, which + current scope. If only *globals* is provided, it must be a dictionary + (and not a subclass of dictionary), which will be used for both the global and the local variables. If *globals* and *locals* are given, they are used for the global and local variables, respectively. If provided, *locals* can be any mapping object. Remember |