Exemplo n.º 1
0
 def visit_print(self, node, parent):
     """visit a Print node by returning a fresh instance of it"""
     newnode = new.Print()
     self._set_infos(node, newnode, parent)
     newnode.dest = self.visit(node.dest, newnode)
     newnode.values = [self.visit(child, newnode) for child in node.nodes]
     newnode.nl = False
     return newnode
Exemplo n.º 2
0
 def visit_print(self, node, parent):
     """visit a Print node by returning a fresh instance of it"""
     newnode = new.Print()
     _lineno_parent(node, newnode, parent)
     newnode.nl = node.nl
     newnode.dest = self.visit(node.dest, newnode)
     newnode.values = [self.visit(child, newnode) for child in node.values]
     newnode.set_line_info(newnode.last_child())
     return newnode