Asterisks in function definitions may be at the end of a func without a comma, fixes #44

This commit is contained in:
Dave Halter
2018-07-04 09:51:34 +02:00
parent 29b6232541
commit 0daf4d9068
2 changed files with 16 additions and 1 deletions

View File

@@ -537,7 +537,9 @@ def _create_params(parent, argslist_list):
if child is None or child == ',':
param_children = children[start:end]
if param_children: # Could as well be comma and then end.
if param_children[0] == '*' and param_children[1] == ',' \
if param_children[0] == '*' \
and (len(param_children) == 1
or param_children[1] == ',') \
or check_python2_nested_param(param_children[0]):
for p in param_children:
p.parent = parent