diff --git a/jedi/inference/compiled/value.py b/jedi/inference/compiled/value.py index ffe71e5a..f468fb8b 100644 --- a/jedi/inference/compiled/value.py +++ b/jedi/inference/compiled/value.py @@ -181,10 +181,12 @@ class CompiledObject(Value): def _ensure_one_filter(self, is_instance): return CompiledObjectFilter(self.inference_state, self, is_instance) - @CheckAttribute(u'__getitem__') def py__simple_getitem__(self, index): with reraise_getitem_errors(IndexError, KeyError, TypeError): - access = self.access_handle.py__simple_getitem__(index) + try: + access = self.access_handle.py__simple_getitem__(index) + except AttributeError: + return super(CompiledObject, self).py__simple_getitem__(index) if access is None: return NO_VALUES