[Python-checkins] python/dist/src/Misc NEWS,1.642,1.643

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
2003年2月06日 08:00:37 -0800


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv19916
Modified Files:
	NEWS 
Log Message:
Add news item about __module__ attribute on functions.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.642
retrieving revision 1.643
diff -C2 -d -r1.642 -r1.643
*** NEWS	5 Feb 2003 18:29:34 -0000	1.642
--- NEWS	6 Feb 2003 16:00:15 -0000	1.643
***************
*** 31,34 ****
--- 31,42 ----
 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
 -----------------

AltStyle によって変換されたページ (->オリジナル) /