mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Fix an issue where a slice is indexed, fixes #1748
This commit is contained in:
@@ -44,6 +44,8 @@ b[int():]
|
||||
|
||||
#? list()
|
||||
b[:]
|
||||
#? int()
|
||||
b[:, :-1]
|
||||
|
||||
#? 3
|
||||
b[:]
|
||||
@@ -67,6 +69,20 @@ class _StrangeSlice():
|
||||
#? slice()
|
||||
_StrangeSlice()[1:2]
|
||||
|
||||
for x in b[:]:
|
||||
#? int()
|
||||
x
|
||||
|
||||
for x in b[:, :-1]:
|
||||
#?
|
||||
x
|
||||
|
||||
class Foo:
|
||||
def __getitem__(self, item):
|
||||
return item
|
||||
|
||||
#?
|
||||
Foo()[:, :-1][0]
|
||||
|
||||
# -----------------
|
||||
# iterable multiplication
|
||||
|
||||
Reference in New Issue
Block a user