[Python-Dev] python 3 niggle: None < 1 raises TypeError

Lele Gaifax lele at metapensiero.it
Tue Feb 18 21:48:06 CET 2014

Brett Cannon <brett at python.org> writes:

>> Yes, I see your point, but please also consider that None is
>> used in database applications as natural mapping for SQL NULL
>> and in other data processing applications to mean "no value".
> Fine, but not everything uses a database. =)

Right, and even if everything did, as already said not all databases
share the same default ordering rules, or have the same syntax to impose
one specific direction.

But more to the point, no database I know let you say "WHERE somecolumn
< 1" and expect that when "somecolumn IS NULL" the condition is true...

Paradoxically, if Python goes back to give a meaning to "None < 1", it
would have an even more different semantic than most database engines
out there.

ciao, lele.
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele at metapensiero.it  |                 -- Fortunato Depero, 1929.

More information about the Python-Dev mailing list