Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
45ed0124
Commit
45ed0124
authored
Jul 08, 2012
by
Terry Jan Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #13557: Clarify effect of giving two different namespaces to exec or
execfile().
parent
e7d4b607
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
Doc/library/functions.rst
Doc/library/functions.rst
+4
-1
Doc/reference/simple_stmts.rst
Doc/reference/simple_stmts.rst
+3
-0
Misc/NEWS
Misc/NEWS
+3
-1
No files found.
Doc/library/functions.rst
View file @
45ed0124
...
...
@@ -430,7 +430,10 @@ available. They are listed here in alphabetical order.
The arguments are a file name and two optional dictionaries. The file is parsed
and evaluated as a sequence of Python statements (similarly to a module) using
the *globals* and *locals* dictionaries as global and local namespace. If
provided, *locals* can be any mapping object.
provided, *locals* can be any mapping object. Remember that at module level,
globals and locals are the same dictionary. If two separate objects are
passed 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.
...
...
Doc/reference/simple_stmts.rst
View file @
45ed0124
...
...
@@ -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.
...
...
Misc/NEWS
View file @
45ed0124
...
...
@@ -284,7 +284,9 @@ Build
-
Issue
#
14437
:
Fix
building
the
_io
module
under
Cygwin
.
Documentation
-------------
-
Issue
#
13557
:
Clarify
effect
of
giving
two
different
namespaces
to
exec
or
execfile
().
-
Issue
#
14034
:
added
the
argparse
tutorial
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment