On 6/16/05, Vibha Tripathi <[EMAIL PROTECTED]> wrote:
> I need sets as sets in mathematics:

That's tough. First of all, mathematical sets can be infinite. It's
just too much memory :)
Software implementations can't fully match mathematical abstractions.

>    sets of any unique type of objects including those
> of dictionaries, I should then be able to do:
> a_set.__contains__(a_dictionary) and things like that.

Maybe you can use a list for that:

>>> d1 = {1: 2}
>>> d2 = {3: 4}
>>> s = [d1, d2]
>>> {1: 2} in s
True
>>> {5: 6} in s
False

> Can sets in Python 2.4.1, be reimplemented from
> scratch to not have it work on top of dict?

Sure, why not?

- kv
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to