Skip to content

Commit 9ca4cb0

Browse files
committed
Avoid slice.indices
1 parent c525cc8 commit 9ca4cb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/kirin/dialects/py/indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ def getitem(
233233
if isinstance(index.data, int) and 0 <= index.data < len(obj):
234234
return (obj[index.data],)
235235
elif isinstance(index.data, slice):
236-
start, stop, step = index.data.indices(len(obj))
237-
return (const.PartialTuple(obj[start:stop:step]),)
236+
sl = index.data
237+
return (const.PartialTuple(obj[sl.start : sl.stop : sl.step]),)
238238
return (const.Unknown(),)
239239

240240

0 commit comments

Comments
 (0)