Skip to content

Commit

Permalink
per_index_values is now a method that all the iterable objects should…
Browse files Browse the repository at this point in the history
… support. however its name is confusing and it should soon be refactored.
  • Loading branch information
davidhalter committed Nov 3, 2015
1 parent 84c43bf commit 99739aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jedi/evaluate/iterable.py
Expand Up @@ -395,18 +395,18 @@ def __len__(self):

def ordered_elements_of_iterable(evaluator, iterable_type, all_values):
"""
This function returns the ordered types of an iterable. If the input is not
an Array, we just return all types as the first and only item of the
output list.
This function returns the ordered types of an iterable.
"""
ordered = []
# Unpack the iterator values
for sequence in iterable_type:
if not isinstance(sequence, Array):
try:
per_index_values = sequence.per_index_values
except AttributeError:
ordered = [literals_to_types(evaluator, all_values)]
break
else:
for i, types in enumerate(sequence.per_index_values()):
for i, types in enumerate(per_index_values()):
try:
ordered[i] |= types
except IndexError:
Expand Down

0 comments on commit 99739aa

Please sign in to comment.