1
0
forked from VimPlug/jedi

Fix py__getitem__ on Array.

This commit is contained in:
Dave Halter
2015-12-05 02:48:20 +01:00
parent db060c70c9
commit d65684a40b
4 changed files with 41 additions and 21 deletions
+5 -3
View File
@@ -548,13 +548,15 @@ def check_tuple_assignments(evaluator, types, name):
"""
for index, node in name.assignment_indexes():
iterated = iterable.py__iter__(evaluator, types, node)
all_types = set()
for _ in range(index + 1):
try:
types = next(iterated)
all_types |= types
except StopIteration:
types = all_types
# We could do this with the default param in next. But this
# would allow this loop to run for a very long time if the
# index number is high. Therefore break if the loop is
# finished.
types = set()
break
return types