py: Shorten error messages by using contractions and some rewording.
This commit is contained in:
@@ -863,7 +863,7 @@ mp_obj_t mp_obj_instance_call(mp_obj_t self_in, size_t n_args, size_t n_kw, cons
|
||||
mp_raise_TypeError("object not callable");
|
||||
} else {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
|
||||
"'%s' object is not callable", mp_obj_get_type_str(self_in)));
|
||||
"'%s' object isn't callable", mp_obj_get_type_str(self_in)));
|
||||
}
|
||||
}
|
||||
mp_obj_instance_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
@@ -1090,10 +1090,10 @@ mp_obj_t mp_obj_new_type(qstr name, mp_obj_t bases_tuple, mp_obj_t locals_dict)
|
||||
// TODO: Verify with CPy, tested on function type
|
||||
if (t->make_new == NULL) {
|
||||
if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
|
||||
mp_raise_TypeError("type is not an acceptable base type");
|
||||
mp_raise_TypeError("type isn't an acceptable base type");
|
||||
} else {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
|
||||
"type '%q' is not an acceptable base type", t->name));
|
||||
"type '%q' isn't an acceptable base type", t->name));
|
||||
}
|
||||
}
|
||||
#if ENABLE_SPECIAL_ACCESSORS
|
||||
|
||||
Reference in New Issue
Block a user