mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-16 02:27:06 +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
|
||||
# -----------------
|
||||
|
||||
@@ -12,6 +12,7 @@ sorted(arr)[0]
|
||||
|
||||
#? str()
|
||||
next(reversed(arr))
|
||||
next(reversed(arr))
|
||||
|
||||
# should not fail if there's no return value.
|
||||
def yielder():
|
||||
|
||||
Reference in New Issue
Block a user