[Python-Dev] DB-API v2.1 or v3 [inspired by: python 3 niggle: None < 1 raises TypeError]

Jim Jewett jimjjewett at gmail.com
Thu Feb 20 17:18:18 CET 2014

I personally regret that sorting isn't safe, but that ship has sailed.

There is practicality benefit in making None compare to everything,
just as C and Java do with null pointers -- but it is too late to do
by default.

Adding a keyword to sorted might be nice -- but then shouldn't it also
be added to other sorts, and maybe max/min?  It might just be trading
one sort of mess for another.

What *can* reasonably be changed is the DB-API.  Why not just specify
that the DB type objects themselves should handle comparison to None?



More information about the Python-Dev mailing list