summaryrefslogtreecommitdiffstatshomepage
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-09-03 23:14:06 +0100
committerDamien George <damien.p.george@gmail.com>2015-09-03 23:14:06 +0100
commit821b7f22fec342cf0b1b61d959e6c07b9543c696 (patch)
treee5585b0625c7c1d440df768b233a0afd9ddfa9e6 /py/objstr.c
parent25afc7da0db43754f6b4373a10b66551dd3cbd57 (diff)
downloadmicropython-821b7f22fec342cf0b1b61d959e6c07b9543c696.tar.gz
micropython-821b7f22fec342cf0b1b61d959e6c07b9543c696.zip
py: Use mp_not_implemented consistently for not implemented features.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 4a0705af37..274e76daaa 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -391,8 +391,7 @@ STATIC mp_obj_t bytes_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
if (MP_OBJ_IS_TYPE(index, &mp_type_slice)) {
mp_bound_slice_t slice;
if (!mp_seq_get_fast_slice_indexes(self_len, index, &slice)) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_NotImplementedError,
- "only slices with step=1 (aka None) are supported"));
+ mp_not_implemented("only slices with step=1 (aka None) are supported");
}
return mp_obj_new_str_of_type(type, self_data + slice.start, slice.stop - slice.start);
}
@@ -975,7 +974,7 @@ mp_obj_t mp_obj_str_format(mp_uint_t n_args, const mp_obj_t *args, mp_map_t *kwa
arg = key_elem->value;
}
if (*lookup) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_NotImplementedError, "attributes not supported yet"));
+ mp_not_implemented("attributes not supported yet");
}
vstr_free(field_name);
field_name = NULL;