1
0
forked from VimPlug/jedi

add __iter__method to InstanceElement, because it's needed for arrays

This commit is contained in:
David Halter
2013-07-24 17:21:49 +02:00
parent c8648d9ca5
commit 284f2f1671
3 changed files with 9 additions and 3 deletions

View File

@@ -1260,9 +1260,11 @@ class Array(Call):
This is not only used for calls on the actual object, but for
ducktyping, to invoke this function with anything as `self`.
"""
if isinstance(instance, Array):
try:
if instance.type in types:
return True
except AttributeError:
pass
return False
def __len__(self):