Raymond Hettinger added the comment: What is the use case?
What would be the criteria for comparing functions? Would the func_name have to match? Would the func_defaults have to match? Would the f.__code__.co_names have to match (the internal variable names? Do the function attributes in f.__dict__ have to match? Does the func.__doc__ have to match? The problem is that functions are complex objects and the equivalence criteria means different things to different people. In the absence of a clear spec that makes sense to most people, object identity is the only sure definition of equivalence. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21130> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com