Bruce Leban wrote:
> 
> 
> On Tue, Nov 11, 2008 at 2:00 PM, Greg Ewing <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     M.-A. Lemburg wrote:
> 
>         On 2008-11-11 14:28, Antoine Pitrou wrote:
> 
>             But why should "n/a" (or "missing", or "undefined") imply
>             "smaller than
>             everything else"?
> 
> 
>         It's just a convention based on viewing None as "nothing" or the
>         empty set.
> 
> 
>     It would be possible to implement this convention in the
>     sort method, without making it a feature of comparisons
>     in general.
> 
> 
> +1

Adding a shorthand way of filtering out or otherwise permitting "None"
entries in sorted()/list.sort() certainly has a greater chance of
acceptance than bringing back ordering comparisons to None in general.

As Marcin points out though, there would be potential issues with such
an idea that may even need a PEP to thrash out (mainly the "what happens
for containers" question that he brings up, but there may be other
pitfalls as well).

Application specific key or comparison functions with their own ideas on
how to handle None really don't sound like a bad idea to me.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to