summaryrefslogtreecommitdiff
path: root/py/objtuple.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-08-09 20:00:18 -0400
committerGitHub <noreply@github.com>2018-08-09 20:00:18 -0400
commitbbc034cd3dfc46ee7938faedc915fec91610c6a3 (patch)
tree4fe11d359088e41790030fce0763471b76ab3fb4 /py/objtuple.c
parentb735b9dbed2132f07793324a40770f4bd96d9ae8 (diff)
parent24e53ad5911f42efb6508b4a8dcf4a196a81494a (diff)
Merge pull request #1104 from tannewt/more_strings
Fixes and translate more strings.
Diffstat (limited to 'py/objtuple.c')
-rw-r--r--py/objtuple.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/objtuple.c b/py/objtuple.c
index 34b7664eb..b4f5b1bdf 100644
--- a/py/objtuple.c
+++ b/py/objtuple.c
@@ -30,6 +30,8 @@
#include "py/objtuple.h"
#include "py/runtime.h"
+#include "supervisor/shared/translate.h"
+
/******************************************************************************/
/* tuple */
@@ -182,7 +184,7 @@ mp_obj_t mp_obj_tuple_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
if (MP_OBJ_IS_TYPE(index, &mp_type_slice)) {
mp_bound_slice_t slice;
if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice)) {
- mp_raise_NotImplementedError("only slices with step=1 (aka None) are supported");
+ mp_raise_NotImplementedError(translate("only slices with step=1 (aka None) are supported"));
}
mp_obj_tuple_t *res = MP_OBJ_TO_PTR(mp_obj_new_tuple(slice.stop - slice.start, NULL));
mp_seq_copy(res->items, self->items + slice.start, res->len, mp_obj_t);