Separating __cmp__ from < and > ?
Aahz Maruch
aahz at netcom.com
Mon Aug 14 20:47:27 EDT 2000
In article <slrn8ph4ba.u2.hzhu at rocket.knowledgetrack.com>,
Huaiyu Zhu <hzhu at users.sourceforge.net> wrote:
>
>In many situations it is conceptually possible to have a!=b without either
>a<b or a>b. Mathematically, this is the case for objects that live in a
>partially ordered space.
Right. Problem is, though, that if you have a list of such objects and
someone does list.sort(), you need to have a way of evaluating the sort
order. My suggestion to you is that you define a new set of methods for
these objects.
--
--- Aahz (Copyright 2000 by aahz at pobox.com)
Androgynous poly kinky vanilla queer het <*> http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6
Gun-toting Naderite / socialized medicine libertarian
More information about the Python-list
mailing list