[Python-Dev] Efficient set complement and operation on large/infinite sets.

Terry Jones terry at jon.es
Fri May 12 01:51:12 CEST 2006


>>>>> "Guido" == Guido van Rossum <guido at python.org> writes:
Guido> Hm...  Without reading though all this, I expect that you'd be
Guido> better off implementing this for yourself without attempting to pull
Guido> the standard library sets into the picture (especially since sets.py
Guido> is obsolete as of 2.4; set and frozenset are now built-in types).
Guido> You're really after rather specialized set representations. I've
Guido> done this myself and as long as you stick to solving *just* the
Guido> problem at hand, it's easy. If you want a general solution, it's
Guido> hard...

I certainly would be better off in the short term, and probably the long
term too. It's likely what I'll do in any case as it's much, much quicker,
I only need a handful of the set operations, and I don't need to talk to
anyone :-)

I don't think I'm proposing something specialized. Set complement is
something one learns in primary school. It's just difficult to provide in
general, as you say.

Aside from my own itch, which I know how to scratch, my question is whether
it's worth trying to work this into Python itself. Sounds like not.

Terry


More information about the Python-Dev mailing list