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

Eugene Alterman eugalt at gmail.com
Sat May 18 06:50:56 EDT 2019


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?




More information about the Python-list mailing list