This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients
Date 2006-06-30.20:33:47
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=835142

I did not measure the memory usage and I don't think such
measurement will yield a compelling reason for the change. 
I suggested that a set is half of a dict, but that was wrong
because dictentry is only 1.5 times larger than setentry
because of the cached hash and depending on the size of the
internet strings, large portion of the memory will be used
by the string object themselves and that will not change
with the patch.

My primary reason is the simplicity (you can call it
maintainability).  I find the off by two reference count in
the current dict based implementation rather unnatural and
I think the dict that maps keys to themselves is a set.

I disagree with Martin. I think interning is a set
operation and it is unfortunate that set API does not
support it directly.

I guess the current view is that set is not a container.
Although you can put things in a set and check if they
are there, there is no API to get the things back.

I would really like to see set C API to provide all
the functionality of a dict with value=key, but it
is also possible that I complitely misunderstood the
need of the set object in the first place.
 
History
Date User Action Args
2007-08-23 15:52:50adminlinkissue1507011 messages
2007-08-23 15:52:50admincreate