예제 #1
0
 def visit_DefNode(self, node):
     # use fake expressions with the right result type
     if node.star_arg:
         self.mark_assignment(node.star_arg, TypedExprNode(Builtin.tuple_type))
     if node.starstar_arg:
         self.mark_assignment(node.starstar_arg, TypedExprNode(Builtin.dict_type))
     EnvTransform.visit_FuncDefNode(self, node)
     return node
예제 #2
0
 def visit_DefNode(self, node):
     # use fake expressions with the right result type
     if node.star_arg:
         self.mark_assignment(node.star_arg,
                              TypedExprNode(Builtin.tuple_type))
     if node.starstar_arg:
         self.mark_assignment(node.starstar_arg,
                              TypedExprNode(Builtin.dict_type))
     EnvTransform.visit_FuncDefNode(self, node)
     return node