Author: Raffael Tfirst <raffael.tfi...@gmail.com> Branch: py3.5 Changeset: r85146:4ed7839a6bd6 Date: 2016-06-13 21:51 +0200 http://bitbucket.org/pypy/pypy/changeset/4ed7839a6bd6/
Log: Return an arg (instead of identifier value) in handle arguments for STAR and DOUBLESTAR diff --git a/pypy/interpreter/astcompiler/astbuilder.py b/pypy/interpreter/astcompiler/astbuilder.py --- a/pypy/interpreter/astcompiler/astbuilder.py +++ b/pypy/interpreter/astcompiler/astbuilder.py @@ -570,9 +570,7 @@ kwonly = [] if n_kwdonly else None kwdefaults = [] kwarg = None - kwargann = None vararg = None - varargann = None if n_pos + n_kwdonly > 255: self.error("more than 255 arguments", arguments_node) # process args @@ -604,11 +602,7 @@ i = self.handle_keywordonly_args(arguments_node, i, kwonly, kwdefaults) else: - vararg = name_node.get_child(0).get_value() - vararg = self.new_identifier(vararg) - self.check_forbidden_name(vararg, name_node) - if name_node.num_children() > 1: - varargann = self.handle_expr(name_node.get_child(2)) + vararg = self.handle_arg(name_node) i += 3 if i < child_count: next_arg_type = arguments_node.get_child(i).type @@ -618,11 +612,7 @@ kwonly, kwdefaults) elif arg_type == tokens.DOUBLESTAR: name_node = arguments_node.get_child(i + 1) - kwarg = name_node.get_child(0).get_value() - kwarg = self.new_identifier(kwarg) - self.check_forbidden_name(kwarg, name_node) - if name_node.num_children() > 1: - kwargann = self.handle_expr(name_node.get_child(2)) + kwarg = self.handle_arg(name_node) i += 3 else: raise AssertionError("unknown node in argument list") _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit