On Wed, 12 May 2010 06:34:50 pm Stephen J. Turnbull wrote: > Lie Ryan writes: > > it disappoints me this does not compare equal: > > > > add3 = lambda a, b, c: a + b + c > > a = partial(partial(add3, 1), 2) > > b = partial(partial(add3, 2), 1) > > print a == b > > > > :-) > > But it's not even true for floating point.<wink>
All humour aside, let's not ruin the chances of this patch being accepted by overloading it. I think there is a good use-case for partial objects to compare equal if they were constructed with arguments that compare equal. That's a nice, conservative change that is unlikely to lead to bugs, unlike some of the more "clever" proposals that rely on mathematical equivalences that don't hold for Python objects. -- Steven D'Aprano _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com