1
0
forked from VimPlug/jedi

Add an access abstraction (only array tests work, yet)

The access abstraction will be the new way of accessing builtin objects. This way it will be easier to move that to another process
This commit is contained in:
Dave Halter
2017-11-25 19:47:49 +01:00
parent 52bc1be84e
commit 7263d8565b
10 changed files with 408 additions and 235 deletions

View File

@@ -85,8 +85,13 @@ class Context(BaseContext):
result = ContextSet()
for index in index_contexts:
if isinstance(index, (CompiledObject, Slice)):
if isinstance(index, Slice):
index = index.obj
if isinstance(index, CompiledObject):
try:
index = index.get_safe_value()
except ValueError:
pass
if type(index) not in (float, int, str, unicode, slice, type(Ellipsis)):
# If the index is not clearly defined, we have to get all the