44 for (
size_t i = 0; i < o->
len; i++) {
129 for (
size_t i = 0; i <
self->len; i++) {
181 #if MICROPY_PY_BUILTINS_SLICE 184 if (!mp_seq_get_fast_slice_indexes(self->len, index, &slice)) {
192 size_t index_value =
mp_get_index(self->base.type, self->len, index,
false);
193 return self->items[index_value];
222 .
name = MP_QSTR_tuple,
243 for (
size_t i = 0; i < n; i++) {
244 o->
items[i] = items[i];
254 *items = &
self->items[0];
275 if (self->cur < self->tuple->len) {
276 mp_obj_t o_out =
self->tuple->items[
self->cur];
mp_obj_t mp_instance_cast_to_native_base(mp_const_obj_t self_in, mp_const_obj_t native_type)
mp_obj_t mp_obj_new_tuple(size_t n, const mp_obj_t *items)
mp_obj_t mp_unary_op(mp_unary_op_t op, mp_obj_t arg)
mp_obj_t mp_obj_tuple_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value)
NORETURN void mp_raise_NotImplementedError(const char *msg)
void mp_obj_tuple_get(mp_obj_t self_in, size_t *len, mp_obj_t **items)
#define MP_OBJ_IS_TYPE(o, t)
#define m_del(type, ptr, num)
STATIC mp_obj_t tuple_count(mp_obj_t self_in, mp_obj_t value)
mp_obj_type_t * mp_obj_get_type(mp_const_obj_t o_in)
mp_obj_t mp_obj_tuple_binary_op(mp_binary_op_t op, mp_obj_t lhs, mp_obj_t rhs)
int mp_print_str(const mp_print_t *print, const char *str)
#define MP_OBJ_FROM_PTR(p)
STATIC mp_obj_t tuple_cmp_helper(mp_uint_t op, mp_obj_t self_in, mp_obj_t another_in)
void mp_arg_check_num(size_t n_args, size_t n_kw, size_t n_args_min, size_t n_args_max, bool takes_kw)
void mp_obj_tuple_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind)
STATIC MP_DEFINE_CONST_DICT(tuple_locals_dict, tuple_locals_dict_table)
mp_obj_t mp_seq_count_obj(const mp_obj_t *items, size_t len, mp_obj_t value)
#define MP_OBJ_SMALL_INT_VALUE(o)
mp_obj_t(* mp_fun_1_t)(mp_obj_t)
bool mp_obj_is_subclass_fast(mp_const_obj_t object, mp_const_obj_t classinfo)
const mp_obj_tuple_t mp_const_empty_tuple_obj
STATIC mp_obj_t tuple_it_iternext(mp_obj_t self_in)
size_t mp_get_index(const mp_obj_type_t *type, size_t len, mp_obj_t index, bool is_slice)
#define MP_OBJ_NEW_SMALL_INT(small_int)
#define m_new_obj_var(obj_type, var_type, var_num)
const mp_obj_type_t mp_type_polymorph_iter
mp_obj_t mp_obj_tuple_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf)
#define mp_check_self(pred)
STATIC MP_DEFINE_CONST_FUN_OBJ_2(tuple_count_obj, tuple_count)
bool mp_seq_cmp_objs(mp_uint_t op, const mp_obj_t *items1, size_t len1, const mp_obj_t *items2, size_t len2)
void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind)
#define m_del_var(obj_type, var_type, var_num, ptr)
void mp_seq_multiply(const void *items, size_t item_sz, size_t len, size_t times, void *dest)
bool mp_obj_get_int_maybe(mp_const_obj_t arg, mp_int_t *value)
const mp_obj_type_t mp_type_type
STATIC mp_obj_t mp_obj_tuple_make_new(const mp_obj_type_t *type_in, size_t n_args, size_t n_kw, const mp_obj_t *args)
#define m_renew(type, ptr, old_num, new_num)
void mp_obj_tuple_del(mp_obj_t self_in)
#define mp_seq_copy(dest, src, len, item_t)
STATIC const mp_rom_map_elem_t tuple_locals_dict_table[]
STATIC mp_obj_t tuple_index(size_t n_args, const mp_obj_t *args)
#define mp_const_empty_tuple
const mp_obj_type_t mp_type_slice
mp_obj_t mp_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf)
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(tuple_index_obj, 2, 4, tuple_index)
struct _mp_obj_tuple_it_t mp_obj_tuple_it_t
#define MP_OBJ_STOP_ITERATION
mp_obj_t mp_iternext(mp_obj_t o_in)
mp_obj_t mp_seq_index_obj(const mp_obj_t *items, size_t len, size_t n_args, const mp_obj_t *args)
mp_obj_t mp_obj_tuple_unary_op(mp_unary_op_t op, mp_obj_t self_in)
#define mp_seq_cat(dest, src1, len1, src2, len2, item_t)
const mp_obj_type_t mp_type_tuple