Author: Raffael Tfirst <[email protected]>
Branch: py3.5
Changeset: r85114:6c4ca5852ddd
Date: 2016-06-12 20:36 +0200
http://bitbucket.org/pypy/pypy/changeset/6c4ca5852ddd/

Log:    Missing increment for doublestars counter and wrong naming

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
@@ -1062,7 +1062,7 @@
                     args.append(self.handle_expr(expr_node))
                 elif expr_node.type == tokens.STAR:
                     # an iterable argument unpacking
-                    if ndoublestars:
+                    if doublestars_count:
                         self.error("iterable argument unpacking follows "
                                    "keyword argument unpacking",
                                    expr_node)
@@ -1074,6 +1074,7 @@
                     # a keyword argument unpacking
                     expr = self.handle_expr(argument.get_child(1))
                     args.append(ast.keyword(None, expr))
+                    doublestars_count += 1
                 elif argument.get_child(1).type == syms.comp_for:
                     # the lone generator expression
                     args.append(self.handle_genexp(argument))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to