mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 14:34:31 +08:00
fix indexing issues for multiple index options
This commit is contained in:
@@ -276,6 +276,17 @@ class GetItem():
|
||||
#? str()
|
||||
GetItem("")[1]
|
||||
|
||||
class GetItemWithList():
|
||||
def __getitem__(self, index):
|
||||
return [1, 1.0, 's'][index]
|
||||
|
||||
#? float()
|
||||
GetItemWithList()[1]
|
||||
|
||||
for i in 0, 2:
|
||||
#? int() str()
|
||||
GetItemWithList()[i]
|
||||
|
||||
# -----------------
|
||||
# conversions
|
||||
# -----------------
|
||||
|
||||
Reference in New Issue
Block a user