On Fri, 12 Jan 2007 23:28:06 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> class Parrot: >> def __eq__(self, other): >> return self.plumage() == other.plumage() >> def __ne__(self, other): >> return self.plumage() != other.plumage() >> def __lt__(self, other): >> return self.plumage() < other.plumage()
[snip more boilerplate code] > If it's that uniform I think you can just use __cmp__: Good point -- I had somehow picked up the mistaken idea that __cmp__ was depreciated in favour of rich comparisons. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list
