summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 572bf299d..edb562df2 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -1076,7 +1076,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
}
field_name = str_to_int(field_name, field_name_top, &index);
if ((uint)index >= n_args - 1) {
- mp_raise_IndexError(translate("tuple index out of range"));
+ mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_tuple);
}
arg = args[index + 1];
*arg_i = -1;
@@ -1104,7 +1104,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
}
}
if ((uint)*arg_i >= n_args - 1) {
- mp_raise_IndexError(translate("tuple index out of range"));
+ mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_tuple);
}
arg = args[(*arg_i) + 1];
(*arg_i)++;