Stephen Hansen me+python at
Wed Jan 21 08:56:56 CET 2015

On Tue, Jan 20, 2015 at 1:45 AM, Marko Rauhamaa <marko at> wrote:

> Terry Reedy <tjreedy at>:
> > Others have answered as to why other special-purpose
> > constrained-structure trees have not been added to the stdlib.
> Ordered O(log n) mappings are not special-purpose data structures. I'd
> say strings and floats are much more special-purpose than ordered
> mappings, and yet Python has direct support for those.

Your anecdote is strong, sir.

However, I use strings thousands of times, floats maybe a hundred of times,
and order mappings a few times.

My anecdote counters yours.

A tree structure is special purpose because there is a lot of options with
different characteristics that make certain implementations ideal in some
cases and not in others.

A float is a float, there's a standard (IEEE 754?), its not special at all.

A string, I suppose, could be special, but that's a pretty nonsense view of
the world since what most people use strings commonly.

I'm not arguing against including a tree, but I have no advice on which
one, and the one-- one!-- time I've needed a tree I got one off pypi. Not
everything needs to be in the stdlib.

But to call strings and floats special purpose is really a silly argument
to make.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list