diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2012-07-08 21:36:14 (GMT) |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2012-07-08 21:36:14 (GMT) |
commit | 83efd6cbb697fec5412ea7a987222baf18349a91 (patch) | |
tree | 21f18b2993fbec3f1f55c5cd615c6f35bd2c711f /Doc/library/functions.rst | |
parent | 45ce4dc73e93e6a2c064de2b1cd2706c98789f45 (diff) | |
download | cpython-83efd6cbb697fec5412ea7a987222baf18349a91.zip cpython-83efd6cbb697fec5412ea7a987222baf18349a91.tar.gz cpython-83efd6cbb697fec5412ea7a987222baf18349a91.tar.bz2 |
Issue #13557: Clarify effect of giving two different namespaces to exec or
execfile().
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r-- | Doc/library/functions.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 3fcd694..b6252e6 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -417,7 +417,10 @@ are always available. They are listed here in alphabetical order. current scope. If only *globals* is provided, it must be a 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. + respectively. If provided, *locals* can be any mapping object. Remember + that at module level, globals and locals are the same dictionary. If exec + gets two separate objects as *globals* and *locals*, the code will be + executed as if it were embedded in a class definition. If the *globals* dictionary does not contain a value for the key ``__builtins__``, a reference to the dictionary of the built-in module |