1.1 --- a/translator.py Sun Oct 23 14:54:04 2016 +0200
1.2 +++ b/translator.py Sun Oct 23 14:56:33 2016 +0200
1.3 @@ -501,7 +501,10 @@
1.4 self.statement(name_ref)
1.5
1.6 elif isinstance(n, compiler.ast.AssAttr):
1.7 - self.statement(self.process_attribute_access(n, self.process_structure_node(expr)))
1.8 + in_assignment = self.in_assignment
1.9 + self.in_assignment = self.process_structure_node(expr)
1.10 + self.statement(self.process_attribute_access(n))
1.11 + self.in_assignment = in_assignment
1.12
1.13 # Lists and tuples are matched against the expression and their
1.14 # items assigned to expression items.
1.15 @@ -517,7 +520,7 @@
1.16 elif isinstance(n, compiler.ast.Subscript):
1.17 self.statement(self.process_subscript_node(n, expr))
1.18
1.19 - def process_attribute_access(self, n, expr=None):
1.20 + def process_attribute_access(self, n):
1.21
1.22 """
1.23 Process the given attribute access node 'n'.
1.24 @@ -553,7 +556,7 @@
1.25
1.26 subs = {
1.27 "<expr>" : str(attr_expr),
1.28 - "<assexpr>" : str(expr),
1.29 + "<assexpr>" : str(self.in_assignment),
1.30 "<context>" : "__tmp_context",
1.31 "<accessor>" : "__tmp_value",
1.32 }