Correct issues with slices and some more subtle bugs.

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

No files matched your search

+3 -3
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