max() of a list of tuples

Delaney, Timothy tdelaney at avaya.com
Tue Jan 21 23:25:54 EST 2003


> From: Martin Maney [mailto:maney at pobox.com]
> 
> Why not (None,None,None) as the initial value?
> 
> first saw the OP's question.  None does seem to compare as less than
> anything else (and, yeah, trying it seemed more natural than 

The ordering of comparison of None with anything else is arbitrary and has
changed over Python versions. 

In fact, except for well-defined cases (such as comparing int with float)
the comparison of an instance of any type with an instance of any other type
is undefined.

Tim Delaney





More information about the Python-list mailing list