From 0253d6eff194a12e2e60bfb9f372de9825bdfab3 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Thu, 6 Feb 2003 16:00:15 +0000 Subject: [PATCH] Add news item about __module__ attribute on functions. --- Misc/NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index 25cbe69aaa..867fb5c1df 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -30,6 +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 + 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 ----------------- -- 2.50.1