mirror of
https://github.com/davidhalter/jedi.git
synced 2026-03-01 11:46:51 +08:00
Fix __getitem__
This commit is contained in:
@@ -214,10 +214,11 @@ class Instance(use_metaclass(CachedMetaClass, Executed)):
|
|||||||
indexes = []
|
indexes = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return self.execute_subscope_by_name('__getitem__', indexes)
|
method = self.get_subscope_by_name('__getitem__')
|
||||||
except KeyError:
|
except KeyError:
|
||||||
debug.warning('No __getitem__, cannot access the array.')
|
debug.warning('No __getitem__, cannot access the array.')
|
||||||
return []
|
else:
|
||||||
|
return self._evaluator.execute(method, [iterable.AlreadyEvaluated(indexes)])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@underscore_memoization
|
@underscore_memoization
|
||||||
|
|||||||
Reference in New Issue
Block a user