Python 3.0, rich comparisons and sorting order

Phil Frost indigo at bitglue.com
Tue Sep 21 13:34:55 EDT 2004


What about binary trees? Currently it's possible to implement a binary
tree that is as general as a dict, but restricting comparisons to like
types would make that impossible.

On Tue, Sep 21, 2004 at 05:24:48PM +0000, Steven Bethard wrote:
> Carlos Ribeiro <carribeiro <at> gmail.com> writes:
> > For example: today's lists may contain objects of arbitrary types and
> > can be sorted; even if the actual ordering may seem arbitrary, it
> > works for most purposes. My question is: If Python 3.0 abolishes
> > comparison between arbitrary types, how will generic sorting be
> > handled?
> 
> Could you give an example of a list that you'd like to do this to?  I'm still 
> having trouble imagining a list of disparate types that I call sort on...
> 
> Thanks,
> 
> Steve



More information about the Python-list mailing list