New submission from Erick Tryzelaar <[EMAIL PROTECTED]>: functools.partial functions are not comparable, in both python 2.5 and 3.0:
>>> def foo(): pass >>> functools.partial(foo) == functools.partial(foo) False It can be worked around by comparing the func, args, and keywords, but this means that if a partial function is stored in some structure, such as: >>> def foo(): pass >>> f1=functools.partial(foo) >>> f2=functools.partial(foo) >>> (1,'a',f1) == (1,'a',f2) False Which complicates things when I'm comparing things in a function that works with generic data structures. Would it be possible to extend partial to support comparisons? ---------- components: Library (Lib) messages: 71200 nosy: erickt severity: normal status: open title: making partial functions comparable type: feature request versions: Python 2.5, Python 3.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3564> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com