Py2.3: Feedback on Sets

Christos TZOTZIOY Georgiou tzot at
Fri Aug 22 09:19:01 CEST 2003

On Wed, 20 Aug 2003 11:10:58 +0300 (IDT), rumours say that Beni
Cherniavsky <cben at> might have written:

>P.S. I wonder what happens if I do::
>    s = Set([1, 2])
>    s.add(s)
>how badly will operations on it break then?  

They won't.  Sets are mutable, so adding a Set to itself actually adds
an ImmutableSet copy constructed on the fly.
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.

More information about the Python-list mailing list