[Python-checkins] bpo-31968: Documentation -- add clarification on the globals dict for exec() (GH-13140)

Raymond Hettinger webhook-mailer at python.org
Sat Jun 1 11:52:02 EDT 2019


https://github.com/python/cpython/commit/059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d
commit: 059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d
branch: master
author: Anthony Shaw <anthony.p.shaw at gmail.com>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2019年06月01日T08:51:58-07:00
summary:
bpo-31968: Documentation -- add clarification on the globals dict for exec() (GH-13140)
files:
M Doc/library/functions.rst
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 7170a7817205..425a985320fc 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


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /