Tim Peters <[EMAIL PROTECTED]> added the comment: BTW, note that the Title of this issue is misleading: pickle.whichmodule() uses object identity ("is":
if ... getattr(module, funcname, None) is func: ) to determine whether the given function object is supplied by a module, so it's /not/ the case that a "wrong" function can be pickled. The worst that can happen is that the correct function is pickled but obtained from a possibly surprising module. For example, random.random can't be confused with any other function named "random". I expect this is why nobody has ever complained about it: unless you're looking at the strings embedded in the pickle GLOBAL opcode, it's unlikely to have a visible consequence. It would still be nice if pickle could identify "the most natural" module for a given function, but hard to make a case that doing so would be much more than /just/ "nice". _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3657> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com