1.1 --- a/common.py Mon May 20 00:55:39 2024 +0200
1.2 +++ b/common.py Tue May 21 12:59:31 2024 +0200
1.3 @@ -381,6 +381,8 @@
1.4 target = compiler.ast.AssAttr(n.node.expr, n.node.attrname, "OP_ASSIGN")
1.5 elif isinstance(n.node, compiler.ast.Name):
1.6 target = compiler.ast.AssName(n.node.name, "OP_ASSIGN")
1.7 + elif isinstance(n.node, compiler.ast.Subscript):
1.8 + target = compiler.ast.Subscript(n.node.expr, "OP_ASSIGN", n.node.subs)
1.9 else:
1.10 target = n.node
1.11
2.1 --- a/tests/list.py Mon May 20 00:55:39 2024 +0200
2.2 +++ b/tests/list.py Tue May 21 12:59:31 2024 +0200
2.3 @@ -97,3 +97,8 @@
2.4
2.5 e.reverse()
2.6 print e # [2, 1, 3]
2.7 +
2.8 +# Test augmented operations.
2.9 +
2.10 +e[0] += e[1]
2.11 +print e # [3, 1, 3]