Skip to content

Commit 62f7ba7

Browse files
committed
Merge pull request adafruit#675 from Rosuav/seq_simplify
Remove unnecessary bounds check from mp_seq_get_fast_slice_indexes.
2 parents 195de32 + 1f44e11 commit 62f7ba7

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

py/sequence.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, mp_bound_
8080
}
8181
if (stop < 0) {
8282
stop = len + stop;
83-
// CPython returns empty sequence in such case
84-
if (stop < 0) {
85-
stop = start;
86-
}
8783
} else if (stop > len) {
8884
stop = len;
8985
}

0 commit comments

Comments
 (0)