Annoying behaviour of the != operator

Rocco Moretti roccomoretti at hotpop.com
Fri Jun 10 13:23:54 EDT 2005


George Sakkis wrote:
> "Rocco Moretti" wrote:
> 
> 
>>One way to handle that is to refuse to sort anything that doesn't have a
>>"natural" order. But as I understand it, Guido decided that being able
>>to sort arbitrary lists is a feature, not a bug.
> 
> 
> He has changed his mind since then
> (http://mail.python.org/pipermail/python-dev/2004-June/045111.html) but
> it was already too late. 

The indicated message sidesteps the crux of the issue. It confirms that 
arbitrary *comparisons* between objects are considered a wart, but it 
says nothing about arbitrary *ordering* of objects.

None > True --> Wart
[None, True].sort() --> ????

The point that I've been trying to get across is that the two issues are 
conceptually separate. (That's not to say that Guido might now consider 
the latter a wart, too.)



More information about the Python-list mailing list