summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2012-07-08 21:35:26 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2012-07-08 21:35:26 (GMT)
commit45ed012433443cc9d79729b91f01f4a5ffe28ba6 (patch)
tree2e2c96f2c139b173d7f07956ffd9a8e2b29ed690 /Doc/reference
parente7d4b607f16ad1116cc6fe4c00cc344c3f2cbe79 (diff)
downloadcpython-45ed012433443cc9d79729b91f01f4a5ffe28ba6.zip
cpython-45ed012433443cc9d79729b91f01f4a5ffe28ba6.tar.gz
cpython-45ed012433443cc9d79729b91f01f4a5ffe28ba6.tar.bz2
Issue #13557: Clarify effect of giving two different namespaces to exec or
execfile().
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/simple_stmts.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/reference/simple_stmts.rst b/Doc/reference/simple_stmts.rst
index 05b78a0..ce22b67 100644
--- a/Doc/reference/simple_stmts.rst
+++ b/Doc/reference/simple_stmts.rst
@@ -993,6 +993,9 @@ current scope. If only the first expression after :keyword:`in` is specified,
it should be a dictionary, which will be used for both the global and the local
variables. If two expressions are given, they are used for the global and local
variables, respectively. If provided, *locals* can be any mapping object.
+Remember that at module level, globals and locals are the same dictionary. If
+two separate objects are given as *globals* and *locals*, the code will be
+executed as if it were embedded in a class definition.
.. versionchanged:: 2.4
Formerly, *locals* was required to be a dictionary.