On 14 February 2014 20:30, Paul Moore <p.f.mo...@gmail.com> wrote:
> On 14 February 2014 10:20, Antoine Pitrou <solip...@pitrou.net> wrote:
>> Hmm, it seems you're right, but I'm quite sure some DBMSes have a
>> consistent way of ordering NULLs when using ORDER BY on a nullable
>> column.
>
> ORDER BY xxx [NULLS FIRST|LAST] is the syntax in Oracle, with (IIRC)
> NULLS LAST as default. But I agree, this is not an argument in favour
> of doing the same in Python.

IIRC, MySQL and PostgreSQL sort them in the opposite order from each
other (or it's possibly just Teiid's PostgreSQL emulation that is the
opposite of MySQL).

Either way, it nicely illustrates *why* we didn't grant None an
exemption from the "no implicit cross-type ordering operations" in
3.x. It does make *adapting* to other models like SQL a bit more
painful though. That's the main reason I still occasionally wonder if
"AlwaysMin" and "AlwaysMax" singletons might make sense, although that
approach has problems of its own (specifically, it's hard to actually
use without breaking the clean NULL -> None mapping and in many cases
+/- infinity already work fine).

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
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