diff --git a/jedi/evaluate/__init__.py b/jedi/evaluate/__init__.py index 103f5ca0..822f0dde 100644 --- a/jedi/evaluate/__init__.py +++ b/jedi/evaluate/__init__.py @@ -234,7 +234,13 @@ class Evaluator(object): elif trailer_op == '(': new_types += self.execute(typ, node) elif trailer_op == '[': - new_types += typ.get_index_types(node) + try: + get = typ.get_index_types + except AttributeError: + debug.warning("TypeError: '%s' object is not subscriptable" + % typ) + else: + new_types += get(self, node) return new_types @debug.increase_indent diff --git a/jedi/evaluate/param.py b/jedi/evaluate/param.py index 9fa31247..2e107147 100644 --- a/jedi/evaluate/param.py +++ b/jedi/evaluate/param.py @@ -161,7 +161,8 @@ def get_params(evaluator, func, var_args): param_dict[str(param.get_name())] = param # There may be calls, which don't fit all the params, this just ignores it. #unpacked_va = _unpack_var_args(evaluator, var_args, func) - var_arg_iterator = common.PushBackIterator(iter(var_args.unpack())) + unpacked_va = var_args.unpack() + var_arg_iterator = common.PushBackIterator(iter(unpacked_va)) non_matching_keys = [] keys_used = set()