Sets Module Bug?

"Martin v. Löwis" martin at v.loewis.de
Mon Aug 2 10:14:04 EDT 2004


>  >>> Set((1,2,3))
[...]
> How can a Set using a tuple or list be ok, but not a tuple of lists?

I think you are confused by the syntax above. This expression constructs
a Set object, and fills it with the members of the tuple. In no way does
the Set "use" the tuple - once the Set is created, the tuple goes away.

So you should have asked "How can a Set containing numbers be ok, but
not a Set containing lists?", to which the other two posters gave the
right answer.

Regards,
Martin



More information about the Python-list mailing list