29 Aug
2012
29 Aug
'12
10:24 p.m.
On Wed, Aug 29, 2012 at 2:21 PM, Guido van Rossum
{a, b, c} = m
But {a, b, c} is already a set. I'd expect set-like semantics, perhaps assigning the keys of a 3-element set in arbitrary order to the variables a, b and c.
I considered this before posting and I think the potential for such confusion is rather low. We already allow [a,b,c] = and (a,b,c) = even though tuples are supposed to be immutable and (a,b,c) = may look like a syntax error to someone unfamiliar with unpacking. I don't see much of a problem with having the same syntactic elements have different meaning when they appear as in an assignment target.