A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2014-February/132336.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 TypeErrorAntoine Pitrou solipsis at pitrou.net
Fri Feb 14 11:02:02 CET 2014
On Fri, 14 Feb 2014 10:46:50 +0100
Lennart Regebro <regebro at gmail.com> wrote:
> >
> > Sending this to python-dev as I'm wondering if this was considered when the
> > choice to have objects of different types raise a TypeError when ordered...
> >
> > So, the concrete I case I have is implementing stable ordering for the
> > python Range objects that psycopg2 uses. These have 3 attributes that can
> > either be None or, for sake of argument, a numeric value.
> >
[...]
> 
> It was considered. It's not obvious where you want "None" to appear in
> your ordering, so you will have to implement this by yourself. I can't
> come up with anything obviously shorter.

I have to agree with Lennart. The fact that SQL defines an order for
NULL and other values doesn't mean it's obvious or right in any way (I
never remember which way it goes).

Regards

Antoine.


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