[Python-Dev] Re: PEP 218 (sets); moving set.py to Lib

Michael Chermside mcherm@destiny.com
Tue, 03 Sep 2002 10:11:45 -0400


>> Hmm, I intended to have s1.refresh() return a new object for use in
>> s2 while leaving s1 alone (being immutable and all).  Now, I wonder
>> if that was the right thing to do.  The answer lies in use cases for
>> algorithms that need sets of sets.  If anyone knows off the top of
>> their head that would be great; otherwise, I seem to remember that
>> some of that business was found in compiler algorithms and graph
>> packages.
> 
> Let's call YAGNI on this one.
> 

Furthermore, what if I create a BIG set like this:

   s = ImmutableSet( range(2**x) )

Now, not only do I use lots of memory for s, I ALSO keep around lots of 
memory to preserve a temporary list which I never wanted to keep anyhow!

-- Michael Chermside