On May 4, 5:04 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> Does set membership test for equality ("==") or identity ("is")?  I
> just did some simple class tests, and it looks like sets test for
> identity.

Sets are like dictionaries, they test for equality:

>>> a=1,2
>>> b=1,2
>>> a is b
False
>>> a in set([b])
True

--
Arnaud

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

Reply via email to