1 parent 2705f4c commit ff4b6daCopy full SHA for ff4b6da
1 file changed
py/sequence.c
@@ -56,6 +56,8 @@ bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, machine_u
56
machine_int_t start, stop;
57
mp_obj_slice_get(slice, &ostart, &ostop, &ostep);
58
if (ostep != mp_const_none && ostep != MP_OBJ_NEW_SMALL_INT(1)) {
59
+ nlr_raise(mp_obj_new_exception_msg(&mp_type_NotImplementedError,
60
+ "Only slices with step=1 (aka None) are supported"));
61
return false;
62
}
63
0 commit comments