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

Glenn Linderman v+python at g.nevcal.com
Tue Feb 18 21:03:08 CET 2014


On 2/18/2014 7:57 AM, Brett Cannon wrote:
>
>     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. =)

Python None and SQL NULL share some properties, which makes it seem like 
it is a natural mapping. However, they also have some differing 
properties, which means that really it isn't a natural mapping.

A big mistake in most Python/SQL marriages is the failure to implement 
an SQL NULL class that fully matches SQL semantics.

Of course it is easier to map SQL NULL to Python None and then complain 
about the semantic differences.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140218/56c8891e/attachment.html>


More information about the Python-Dev mailing list