1
0
forked from VimPlug/jedi

Correct issues with slices and some more subtle bugs.

This commit is contained in:
Dave Halter
2015-11-01 21:30:41 +01:00
parent dd6ade194a
commit 84c43bf2dc
6 changed files with 14 additions and 14 deletions

View File

@@ -634,11 +634,11 @@ class Slice(object):
result = self._evaluator.eval_element(element)
if len(result) != 1:
# We want slices to be clear defined with just one type.
# Otherwise we will return an empty slice object.
# For simplicity, we want slices to be clear defined with just
# one type. Otherwise we will return an empty slice object.
raise IndexError
try:
return result[0].obj
return list(result)[0].obj
except AttributeError:
return None