8000 use a standard error message · jepler/circuitpython@a94663b · GitHub
[go: up one dir, main page]

Skip to content

Commit a94663b

Browse files
committed
use a standard error message
1 parent d39d146 commit a94663b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/objstrunicode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const byte *str_index_to_ptr(const mp_obj_type_t *type, const byte *self_data, s
159159
if (mp_obj_is_small_int(index)) {
160160
i = MP_OBJ_SMALL_INT_VALUE(index);
161161
} else if (!mp_obj_get_int_maybe(index, &i)) {
162-
mp_raise_TypeError_varg(MP_ERROR_TEXT("string indices must be integers, not %q"), mp_obj_get_type_qstr(index));
162+
mp_raise_TypeError_varg(translate("%q must be of type %q"), MP_QSTR_index, MP_QSTR_int);
163163
}
164164
const byte *s, *top = self_data + self_len;
165165
if (i < 0) {

0 commit comments

Comments
 (0)
0