At Sunday 28/1/2007 18:21, Thomas Nelson wrote:
><wojciech_m...@poczta.null.onet.pl.invalidwrote :
Define method __gt__.
This works, thanks. I was a little surprised though. is __cmp__ used
by any builtin functions?
The problem is, rich comparison functions take precedence over
__cmp__, so if your base class (list in this case) already defines
rich comparison, you have to redefine them all.
For simple cases, you can just redefine __cmp__ and reimplement all
others __gt__, __lt__ etc using it.
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas