[pypy-commit] pypy py3.5: Fix _call_has_no_star_args as starargs and kwargs are not existent anymore
raffael_t
pypy.commits at gmail.com
Wed Jun 15 14:02:30 EDT 2016
Author: Raffael Tfirst <raffael.tfirst at gmail.com>
Branch: py3.5
Changeset: r85181:49e5e8c90e82
Date: 2016-06-15 20:01 +0200
http://bitbucket.org/pypy/pypy/changeset/49e5e8c90e82/
Log: Fix _call_has_no_star_args as starargs and kwargs are not existent
anymore
diff --git a/pypy/interpreter/astcompiler/codegen.py b/pypy/interpreter/astcompiler/codegen.py
--- a/pypy/interpreter/astcompiler/codegen.py
+++ b/pypy/interpreter/astcompiler/codegen.py
@@ -1217,7 +1217,15 @@
call.args, call.keywords)
def _call_has_no_star_args(self, call):
- return not call.starargs and not call.kwargs
+ if call.args is not None:
+ for elt in call.args:
+ if isinstance(elt, ast.Starred):
+ return False
+ if call.keywords is not None:
+ for kw in call.keywords:
+ if kw.arg is None:
+ return False
+ return True
def _call_has_simple_args(self, call):
return self._call_has_no_star_args(call) and not call.keywords
More information about the pypy-commit
mailing list