A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-February/132431.html below:

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

[Python-Dev] python 3 niggle: None < 1 raises TypeError [Python-Dev] python 3 niggle: None < 1 raises TypeErrorTerry Reedy tjreedy at udel.edu
Mon Feb 17 20:00:44 CET 2014
On 2/17/2014 1:18 PM, Serhiy Storchaka wrote:
> 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.

That assumption was very intentionally broken and abandoned by Guido 
when complex numbers were added over a decade ago. It was further 
abandoned, intentionally, when datetimes were added. I think it was 
decided then to finish the job in 3.0.

  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.

-- 
Terry Jan Reedy


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4