We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The __cmp__ method

__cmp__(self, other)

Called by comparison operations if rich comparison (see above) is not defined. Should return a negative integer if self < other, zero if self == other, a positive integer if self > other. If no __cmp__, __eq__ or __ne__ operation is defined, class instances are compared by object identity (address). See also the description of __hash__ for some important notes on creating objects which support custom comparison operations and are usable as dictionary keys. (Note: the restriction that exceptions are not propagated by __cmp__ has been removed since Python 1.5.)