diff options
author | Guido van Rossum <guido@python.org> | 2003-02-06 16:16:50 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-06 16:16:50 (GMT) |
commit | 26507dbc82e60d4eda8f6b447c50aecf07b7ca25 (patch) | |
tree | dce5dd6021688f4885346a5aa0f0dc54f71a7079 /Misc | |
parent | 0253d6eff194a12e2e60bfb9f372de9825bdfab3 (diff) | |
download | cpython-26507dbc82e60d4eda8f6b447c50aecf07b7ca25.zip cpython-26507dbc82e60d4eda8f6b447c50aecf07b7ca25.tar.gz cpython-26507dbc82e60d4eda8f6b447c50aecf07b7ca25.tar.bz2 |
Clarify that __module__ applies to various type of functions.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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 an __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 ----------------- |