Trees

Marko Rauhamaa marko at pacujo.net
Wed Jan 21 03:35:41 EST 2015


Stephen Hansen <me+python at ixokai.io>:

> On Tue, Jan 20, 2015 at 1:45 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
>> Terry Reedy <tjreedy at udel.edu>:
>> > 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.
>
> [...]
>
> 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 was reacting to the specific argument that has been made often in
Python circles: ordered mappings are special-purpose. That argument has
nothing to do with how often you need the data structure. It has to do
with how wide an abtract niche the data structure takes in the idea
space.

Now, you could make an argument that there's barely ever a practical
need for ordered mappings (whether right or wrong), and that would
elicit a different kind of response from me.

These and other arguments factor into whether the Python standard
library should contain a feature, ultimately it's GvR's arbitrary call.
He said you should first let it ripen in pypi and gain widespread
traction.


Marko



More information about the Python-list mailing list