From 54d8cd0a9b26a1dc4955552ae43fb56af502a957 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Tue, 24 Mar 2015 15:06:11 +0100 Subject: [PATCH] Small bug in parameter creation. --- jedi/parser/tree.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jedi/parser/tree.py b/jedi/parser/tree.py index 041274c2..c3c220cd 100644 --- a/jedi/parser/tree.py +++ b/jedi/parser/tree.py @@ -745,10 +745,11 @@ def _create_params(parent, argslist_list): for end, child in enumerate(children + [None], 1): if child is None or child == ',': new_children = children[start:end] - if check_python2_nested_param(new_children[0]): - continue - params.append(Param(new_children, parent)) - start = end + if new_children: # Could as well be comma and then end. + if check_python2_nested_param(new_children[0]): + continue + params.append(Param(new_children, parent)) + start = end return params