changeset: 78013:b47ae7a9e685 parent: 78010:5d43154d68a8 parent: 78012:ea670d71a36d user: Terry Jan Reedy date: Sun Jul 08 17:52:58 2012 -0400 files: Doc/library/functions.rst Misc/NEWS description: Merge 3.2 closes issue 13557 diff -r 5d43154d68a8 -r b47ae7a9e685 Doc/library/functions.rst --- a/Doc/library/functions.rst Sun Jul 08 21:03:01 2012 +0200 +++ b/Doc/library/functions.rst Sun Jul 08 17:52:58 2012 -0400 @@ -413,7 +413,10 @@ 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 diff -r 5d43154d68a8 -r b47ae7a9e685 Misc/NEWS --- a/Misc/NEWS Sun Jul 08 21:03:01 2012 +0200 +++ b/Misc/NEWS Sun Jul 08 17:52:58 2012 -0400 @@ -98,6 +98,12 @@ * C frames that are garbage-collecting * C frames that are due to the invocation of a PyCFunction +Documentation +------------- + +- Issue #13557: Clarify effect of giving two different namespaces to exec or + execfile(). + Tests -----

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