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
26507dbc
Commit
26507dbc
authored
Feb 06, 2003
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify that __module__ applies to various type of functions.
parent
0253d6ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Misc/NEWS
Misc/NEWS
+7
-6
No files found.
Misc/NEWS
View file @
26507dbc
...
...
@@ -30,13 +30,14 @@ Core and builtins
to
convert
a
long
integer
into
a
float
which
couldn
't fit.
See SF bug #676155.
- Function objects now have a
n
__module__ attribute that is bound to
- Function objects now have a __module__ attribute that is bound to
the name of the module in which the function was defined. This
attribute is used by pickle.whichmodule(), which changes the
behavior of whichmodule slightly. In Python 2.2 whichmodule()
returns "__main__" for functions that are not defined at the
top-level of a module (examples: methods, nested functions). Now
whichmodule() will return the proper module name.
applies for C functions and methods as well as functions and methods
defined in Python. This attribute is used by pickle.whichmodule(),
which changes the behavior of whichmodule slightly. In Python 2.2
whichmodule() returns "__main__" for functions that are not defined
at the top-level of a module (examples: methods, nested functions).
Now whichmodule() will return the proper module name.
Extension modules
-----------------
...
...
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