"Steven D'Aprano" <[EMAIL PROTECTED]> escribió en el 
mensaje 
news:[EMAIL PROTECTED]
> On Fri, 12 Jan 2007 23:28:06 -0800, Paul Rubin wrote:
>
>> 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.

If you inherit from a base class that implements rich comparisons, you have 
to override all those methods, else your __cmp__ won't be called at all.
Sometimes it may be enough to implement __cmp__ and make all others call it.

-- 
Gabriel Genellina 



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to