Rich Comparisons Gotcha

Mark Wooding mdw at
Wed Jan 7 11:21:50 CET 2009

Steven D'Aprano <steven at> wrote:

> It's only incoherent if you need equality to be an equivalence relation. 
> If you don't, it is perfectly reasonable to declare that i"abc" equals 
> "abc".

Right!  And if you didn't want an equivalence relation, then `==' will
suit you fine.  The problem is that some applications seem to /want/ an
equivalence relation, and one that's more useful (i.e., less
discriminating) than `is'.

-- [mdw]

More information about the Python-list mailing list