def visit_augassign(self, node, parent): """visit an AugAssign node by returning a fresh instance of it""" newnode = new.AugAssign() self._set_infos(node, newnode, parent) self.asscontext = "Aug" newnode.target = self.visit(node.node, newnode) self.asscontext = None newnode.op = node.op newnode.value = self.visit(node.expr, newnode) return newnode
def visit_augassign(self, node, parent): """visit a AugAssign node by returning a fresh instance of it""" newnode = new.AugAssign() _lineno_parent(node, newnode, parent) newnode.op = _BIN_OP_CLASSES[node.op.__class__] + "=" self.asscontext = "Ass" newnode.target = self.visit(node.target, newnode) self.asscontext = None newnode.value = self.visit(node.value, newnode) newnode.set_line_info(newnode.last_child()) return newnode