NaN, Null, and Sorting

Chris Angelico rosuav at
Fri Jan 13 14:58:53 EST 2012

On Sat, Jan 14, 2012 at 6:04 AM, Ethan Furman <ethan at> wrote:
> So I am strongly leaning towards implementing the comparisons such that Null
> objects are less than other objects so they will always sort together.

This is a perfectly plausible view, and is the one adopted by SQL (I'm
pretty sure the "NULLS FIRST" / "NULLS LAST" clause is standard - you
get to choose whether they're less than everything or more than


More information about the Python-list mailing list