diff -r b7abf0590e1c Doc/library/functions.rst --- a/Doc/library/functions.rst Tue May 10 00:38:00 2011 +0200 +++ b/Doc/library/functions.rst Tue May 10 17:42:53 2011 -0400 @@ -373,7 +373,13 @@ 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. When + the code contains only the first expression after :keyword:`in` or the same + dictionary is used for both the global and local variables, the code is executed + in a new top-level scope. However, when two different objects are used for the + global and local variables, the code is executed as if it were in a class + statement in a new top-level scope. + If the *globals* dictionary does not contain a value for the key ``__builtins__``, a reference to the dictionary of the built-in module