17.02.14 20:18, Serhiy Storchaka написав(ла):
17.02.14 14:11, M.-A. Lemburg написав(ла):
Of course, it's easy to add a new type for this, but a lot of Python 2
code relies on None behaving this way, esp. code that reads data from
databases, since None is the Python mapping for SQL NULL.

At the same time a lot of Python 2 relies on the assumption that any two
values are comparable. I suppose that I see a code that try to sort a
heterogeneous list more often than a code which want to sort a list
containing only numbers and Nones.

Sorry, I press "Send" too early.

If we consider the idea to make None universally comparable, we should consider the idea to make all other values universally comparable too. And consider again the reasons which caused these changes in Python 3.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to