summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/obj.c b/py/obj.c
index 8a073f4710..0291386144 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -285,6 +285,8 @@ mp_obj_t mp_obj_len_maybe(mp_obj_t o_in) {
len = seq_len;
} else if (MP_OBJ_IS_TYPE(o_in, &dict_type)) {
len = mp_obj_dict_len(o_in);
+ } else if (MP_OBJ_IS_TYPE(o_in, &array_type)) {
+ len = mp_obj_array_len(o_in);
} else {
return MP_OBJ_NULL;
}