>sorted(P) # throws TypeError: unorderable types Player() < Player()You're either misreading or forgetting that __eq__ and __ne__,
The sorted function works when I define __lt__.
I must be misreading the documentation, because I read for the
documentation __cmp__ that it is called if none of the other rich
comparison functions are defined.
which you define, are rich comparison functions. __cmp__ will only
be called for a comparison when *none* of the rich comparison
functions are defined, not just the one in question.
--
\S -- si***@chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump