[Python-3000] None in Comparisons
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue Nov 11 23:00:45 CET 2008
M.-A. Lemburg wrote:
> On 2008-11-11 14:28, Antoine Pitrou wrote:
>
>>But why should "n/a" (or "missing", or "undefined") imply "smaller than
>>everything else"?
>
> It's just a convention based on viewing None as "nothing" or the
> empty set.
It would be possible to implement this convention in the
sort method, without making it a feature of comparisons
in general.
SQL does something similar -- while nulls sort before
everything else, the result of null < something is null,
not true.
--
Greg
More information about the Python-3000
mailing list