all: Clean up error strings to use lowercase and change cannot to can't.

Now that error string compression is supported it's more important to have
consistent error string formatting (eg all lowercase English words,
consistent contractions).  This commit cleans up some of the strings to
make them more consistent.
This commit is contained in:
Damien George
2020-04-09 17:22:25 +10:00
parent db137e70dc
commit 8e048d2548
15 changed files with 31 additions and 31 deletions

View File

@@ -235,7 +235,7 @@ STATIC mp_obj_t re_split(size_t n_args, const mp_obj_t *args) {
mp_obj_t s = mp_obj_new_str_of_type(str_type, (const byte *)subj.begin, caps[0] - subj.begin);
mp_obj_list_append(retval, s);
if (self->re.sub > 0) {
mp_raise_NotImplementedError(MP_ERROR_TEXT("Splitting with sub-captures"));
mp_raise_NotImplementedError(MP_ERROR_TEXT("splitting with sub-captures"));
}
subj.begin = caps[1];
if (maxsplit > 0 && --maxsplit == 0) {
@@ -403,7 +403,7 @@ STATIC mp_obj_t mod_re_compile(size_t n_args, const mp_obj_t *args) {
int error = re1_5_compilecode(&o->re, re_str);
if (error != 0) {
error:
mp_raise_ValueError(MP_ERROR_TEXT("Error in regex"));
mp_raise_ValueError(MP_ERROR_TEXT("error in regex"));
}
#if MICROPY_PY_URE_DEBUG
if (flags & FLAG_DEBUG) {