[Python-Dev] python 3 niggle: None < 1 raises TypeError
Chris Angelico
rosuav at gmail.com
Fri Feb 14 11:54:35 CET 2014
On Fri, Feb 14, 2014 at 9:42 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> IIRC, MySQL and PostgreSQL sort them in the opposite order from each
> other
Ouch! You're right:
http://dev.mysql.com/doc/refman/5.7/en/working-with-null.html
"""When doing an ORDER BY, NULL values are presented first if you do
ORDER BY ... ASC and last if you do ORDER BY ... DESC."""
Not configurable in MySQL. It's apparently not part of the standard,
according to Wikipedia:
http://en.wikipedia.org/wiki/Order_by
So definitely SQL's handling of NULL should not be any sort of guide
as regards Python's treatment of None.
ChrisA
More information about the Python-Dev
mailing list