[Python-Dev] Dict constructor

Tim Peters tim.one@comcast.net
Sat, 13 Jul 2002 16:51:47 -0400


[Alex Martelli]
> Greg's version's in nondist/sandbox/sets, right?  Where's Aric's?

[Guido]
> http://bent-arrow.com/python

[Alex]
> Ah, a C implementation.  It seems premature to me to consider such
> optimization -- for now, it appears, we're still looking around for the
> right architecture, and that's much more plastic and faster to
> experiment with in Python.  So, I have not studied set.c in detail,

I have, and I'm -1 on it:  it's largely a copy-paste-small-edit of massive
portions of dictobject.c.  If it has to be implemented via massive code
duplication, there are less maintenance-intense ways to do that.

> just browsed the readme to get an idea of the interface -- and that
> seems even more peculiar to me than freeze-on-hashing, although
> generally similar.

freeze-on-hashing was pioneered <wink> in the Python world by kjbuckets.
I've used it in my own Set code for years without particular pain.  Greg
Wilson seemed to hate it, though.

> So, for now, I've stuck to Python,

+1