Inconsistency in Python's Comparisons

Erik Max Francis max at alcyone.com
Wed Mar 17 03:36:09 EST 2004


Dan Bishop wrote:

> # This shouldn't count, for obvious reasons.  But what the heck...

He explicitly restricted himself to not invoking "double-underscore
magic."  You can certainly make classes which don't constitute a
well-ordering, and you can certainly get bizarre behavior by relying on
the (arbitrary) ordering between types, but the only thing I'd be
worried about is such a circular ordering between types in the same
class.

> paper = ContrivedExample(0)
> rock = ContrivedExample(1)
> scissors = ContrivedExample(2)

I do like your example, however :-).

-- 
 __ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/  \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ You and I / We've seen it all / Chasing our hearts' desire
    -- The Russian and Florence, _Chess_



More information about the Python-list mailing list