ops im sorry..i didnt noticed that reply just replyed to you..i thought it
would go to the list.
Thanks for the help
best regards
On Sat, May 17, 2008 at 8:36 PM, Kent Johnson <[EMAIL PROTECTED]> wrote:
> On Sat, May 17, 2008 at 7:04 PM, Tiago Katcipis <[EMAIL PROTECTED]>
> wrote:
> > ive been
On Sat, May 17, 2008 at 7:04 PM, Tiago Katcipis <[EMAIL PROTECTED]> wrote:
> ive been reading and really seens to be better to use cmp... i will not have
> to write a method to every single operator. But when python compare
> objects...like in Sets or Lists...to check for membership etc, it uses cm
On Sat, May 17, 2008 at 2:18 PM, Tiago Katcipis <[EMAIL PROTECTED]> wrote:
> Im writing a class on python and i want to implement the == and != operators
> on it. I have read about __cmp__ and about __eq__ for == and __ne__ for ! =.
> My question is... who is the better to use?
Use __cmp__() if it
Tiago Katcipis wrote:
Im writing a class on python and i want to implement the == and !=
operators on it. I have read about __cmp__ and about __eq__ for == and
__ne__ for ! =. My question is... who is the better to use? and if
there is no better what are the advantages and disvantages of them.