Python 3.0, rich comparisons and sorting order

Steven Bethard steven.bethard at gmail.com
Tue Sep 21 19:42:35 CEST 2004


Phil Frost <indigo <at> bitglue.com> writes:
> On Tue, Sep 21, 2004 at 05:24:48PM +0000, I wrote:
> > 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...
> 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.

Is there a good use case for binary trees with incompatible types at the nodes?

I'm not sure I follow your comparison here anyway, since you can't sort a 
dict...  Could you clarify?

Thanks,

STeve






More information about the Python-list mailing list