[Python-Dev] Set options

Jeremy Hylton jeremy@cnri.reston.va.us
Tue, 21 Mar 2000 12:14:07 -0500 (EST)


>>>>> "MAL" == M -A Lemburg <mal@lemburg.com> writes:

  MAL> Perhaps someone could take Aaron's kjbuckets and write a Python
  MAL> emulation for it (I think he's even already done something like
  MAL> this for gadfly). Then the emulation could go into the core and
  MAL> if people want speed they can install his extension (the
  MAL> emulation would have to detect this and use the real thing
  MAL> then).

I've been waiting for Tim Peters to say something about sets, but I'll
chime in with what I recall him saying last time a discussion like
this came up on c.l.py.  (I may misremember, in which case I'll at
least draw him into the discussion in order to correct me <0.5 wink>.)

The problem with a set module is that there are a number of different
ways to implement them -- in C using kjbuckets is one example.  Each
approach is appropriate for some applications, but not for every one.
A set is pretty simple to build from a list or a dictionary, so we
leave it to application writers to write the one that is appropriate
for their application.

Jeremy