mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
Add news item about __module__ attribute on functions.
This commit is contained in:
parent
c9172d3832
commit
0253d6eff1
1 changed files with 8 additions and 0 deletions
|
|
@ -30,6 +30,14 @@ Core and builtins
|
||||||
to convert a long integer into a float which couldn't fit.
|
to convert a long integer into a float which couldn't fit.
|
||||||
See SF bug #676155.
|
See SF bug #676155.
|
||||||
|
|
||||||
|
- Function objects now have an __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.
|
||||||
|
|
||||||
Extension modules
|
Extension modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue