diff options
Diffstat (limited to 'py/sequence.c')
-rw-r--r-- | py/sequence.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/sequence.c b/py/sequence.c index 0a4bb26b31..8418f1ef67 100644 --- a/py/sequence.c +++ b/py/sequence.c @@ -56,6 +56,8 @@ bool mp_seq_get_fast_slice_indexes(machine_uint_t len, mp_obj_t slice, machine_u machine_int_t start, stop; mp_obj_slice_get(slice, &ostart, &ostop, &ostep); if (ostep != mp_const_none && ostep != MP_OBJ_NEW_SMALL_INT(1)) { + nlr_raise(mp_obj_new_exception_msg(&mp_type_NotImplementedError, + "Only slices with step=1 (aka None) are supported")); return false; } |