[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why is augmented assignment of a tuple with iterable unpacking invalid syntax?

a = 1, 2, 3

b = *a,           # assignment - OK
b += *a,          # augmented assignment - syntax error

Need to enclose in parenthesis:

b += (*a,)

Why isn't it allowed with an augmented assignment, while it is OK with a 
regular assignment?