File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -608,9 +608,13 @@ are always available. They are listed here in alphabetical order.
608
608
will be used for both the global and the local variables. If *globals * and
609
609
*locals * are given, they are used for the global and local variables,
610
610
respectively. If provided, *locals * can be any mapping object. Remember
611
- that at the module level, globals and locals are the same dictionary. If exec
612
- gets two separate objects as *globals * and *locals *, the code will be
613
- executed as if it were embedded in a class definition.
611
+ that at the module level, globals and locals are the same dictionary.
612
+
613
+ .. note ::
614
+
615
+ Most users should just pass a *globals * argument and never *locals *.
616
+ If exec gets two separate objects as *globals * and *locals *, the code
617
+ will be executed as if it were embedded in a class definition.
614
618
615
619
If the *globals * dictionary does not contain a value for the key
616
620
``__builtins__ ``, a reference to the dictionary of the built-in module
You can’t perform that action at this time.
0 commit comments