1
0
forked from VimPlug/jedi

more detailed tests and implementation of array indexing in the interpreter

This commit is contained in:
Dave Halter
2014-04-04 13:22:12 +02:00
parent 50ef3c7fa3
commit a6fbcde184
2 changed files with 19 additions and 3 deletions

View File

@@ -106,12 +106,16 @@ class CompiledObject(Base):
else:
try:
new = self.obj[typ.obj]
except (KeyError, IndexError):
pass
except (KeyError, IndexError, TypeError, AttributeError):
pass # just try, we don't care if it fails.
else:
result.append(CompiledObject(new))
if not result:
pass
try:
for obj in self.obj:
result.append(CompiledObject(obj))
except TypeError:
pass # self.obj maynot have an __iter__ method.
return result
@property