diff options
Diffstat (limited to 'py')
| -rw-r--r-- | py/builtinimport.c | 2 | ||||
| -rw-r--r-- | py/objslice.c | 2 | ||||
| -rw-r--r-- | py/objtype.c | 4 | ||||
| -rw-r--r-- | py/runtime.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c index 5c82c68d9..28a8f41f7 100644 --- a/py/builtinimport.c +++ b/py/builtinimport.c @@ -313,7 +313,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) { // We must have some component left over to import from if (p == this_name) { - mp_raise_ValueError(MP_ERROR_TEXT("cannot perform relative import")); + mp_raise_ValueError(MP_ERROR_TEXT("can't perform relative import")); } uint new_mod_l = (mod_len == 0 ? (size_t)(p - this_name) : (size_t)(p - this_name) + 1 + mod_len); diff --git a/py/objslice.c b/py/objslice.c index 290c29150..c65c30601 100644 --- a/py/objslice.c +++ b/py/objslice.c @@ -124,7 +124,7 @@ void mp_obj_slice_indices(mp_obj_t self_in, mp_int_t length, mp_bound_slice_t *r } else { step = mp_obj_get_int(self->step); if (step == 0) { - mp_raise_ValueError(MP_ERROR_TEXT("slice step cannot be zero")); + mp_raise_ValueError(MP_ERROR_TEXT("slice step can't be zero")); } } diff --git a/py/objtype.c b/py/objtype.c index 3f32cd601..a8eeb1a9f 100644 --- a/py/objtype.c +++ b/py/objtype.c @@ -989,9 +989,9 @@ STATIC mp_obj_t type_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp if (self->make_new == NULL) { #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE - mp_raise_TypeError(MP_ERROR_TEXT("cannot create instance")); + mp_raise_TypeError(MP_ERROR_TEXT("can't create instance")); #else - mp_raise_msg_varg(&mp_type_TypeError, MP_ERROR_TEXT("cannot create '%q' instances"), self->name); + mp_raise_msg_varg(&mp_type_TypeError, MP_ERROR_TEXT("can't create '%q' instances"), self->name); #endif } diff --git a/py/runtime.c b/py/runtime.c index cad2fc256..1fa9e73f2 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -1392,7 +1392,7 @@ mp_obj_t mp_import_from(mp_obj_t module, qstr name) { if (dest[1] != MP_OBJ_NULL) { // Hopefully we can't import bound method from an object import_error: - mp_raise_msg_varg(&mp_type_ImportError, MP_ERROR_TEXT("cannot import name %q"), name); + mp_raise_msg_varg(&mp_type_ImportError, MP_ERROR_TEXT("can't import name %q"), name); } if (dest[0] != MP_OBJ_NULL) { |
