Question: Is there a reason why python can not perform an in-place add operation when unpacking tuples, and is there a simple way around this?

E.g.

```
>>> x, y = (5, 0)
>>> x, y += (1, 8)
SyntaxError: illegal expression for augmented assignment

```

The alternatives are ugly and not very obvious for code maintenance:

```
>>> x, y = (5, 0)
>>> x, y = map(sum, zip((x, y), (1, 8)))

```

Answer: 
Not sure it fits with how Python tuples work normally:

```
>>> (1,2)+(3,4)
(1, 2, 3, 4)

```

rather than `(4,6)`.

For some syntactic convenience, you can also do something like:

```
class pair(object):
    def __init__(self, *a):
        self.a = a
    def __add__(self, t):
        return map(sum, zip(self.a, t))

x, y = (5, 0)
x, y = pair(x, y) + (8, 1)
print x,y

```
You could use operator.add with `*` which might make your intentions more obvious that you are adding each subelement:

```
from operator import add
x, y = map(add, *((x, y), (1, 8)))

```

It is also documented [grammar-token-augmented\_assignment\_stmt](https://docs.python.org/2/reference/simple_stmts.html#grammar-token-augmented_assignment_stmt):

**augmented\_assignment\_stmt** ::= augtarget augop (expression\_list | yield\_expression)

**augtarget** ::= identifier | attributeref | subscription | slicing

**augop** ::= "+=" | "-=" | "\*=" | "/=" | "//=" | "%=" | "\*\*="
 | ">>=" | "<<=" | "&=" | "^=" | "|="

> 
> An augmented assignment evaluates the target (**which, unlike normal assignment statements, cannot be an unpacking**) and the expression list, performs the binary operation specific to the type of assignment on the two operands, and assigns the result to the original target. The target is only evaluated once.
> 
> 
> 

There is also an old discussion on [mail.python.org](https://mail.python.org/pipermail/python-list/2002-November/142772.html) discussing the issue.