1
0
forked from VimPlug/jedi

array indexing works now also with variables

This commit is contained in:
David Halter
2012-08-06 17:47:43 +02:00
parent 8780199a33
commit c154bdad0e
5 changed files with 56 additions and 10 deletions

View File

@@ -139,6 +139,29 @@ dic2[r'asdf']
#? int() str()
dic2['just_something']
# -----------------
# with variable as index
# -----------------
a = (1, "")
index = 1
#? str()
a[index]
# these should just ouput the whole array
index = int
#? int() str()
a[index]
index = int()
#? int() str()
a[index]
# dicts
index = 'asdf'
dic2 = {'asdf': 3, 'b': 'str'}
#? int()
dic2[index]
# -----------------
# __getitem__
# -----------------