Exemplo n.º 1
0
 def visit_index(self, node, parent):
     """visit a Index node by returning a fresh instance of it"""
     newnode = new.Index()
     _lineno_parent(node, newnode, parent)
     newnode.value = self.visit(node.value, newnode)
     newnode.set_line_info(newnode.last_child())
     return newnode
Exemplo n.º 2
0
 def visit_index(self, node, parent):
     """visit an Index node by returning a fresh instance of it"""
     newnode = new.Index()
     self._set_infos(node, newnode, parent)
     newnode.value = self.visit(node.subs[0], newnode)
     return newnode