diff options
Diffstat (limited to 'py/runtime.c')
| -rw-r--r-- | py/runtime.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/py/runtime.c b/py/runtime.c index ca08ce3d1..9d41f059f 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -189,6 +189,9 @@ void rt_init(void) { mp_obj_t m_array = mp_obj_new_module(MP_QSTR_array); rt_store_attr(m_array, MP_QSTR_array, (mp_obj_t)&array_type); + mp_obj_t m_collections = mp_obj_new_module(MP_QSTR_collections); + rt_store_attr(m_collections, MP_QSTR_namedtuple, (mp_obj_t)&mp_namedtuple_obj); + #if MICROPY_CPYTHON_COMPAT // Precreate sys module, so "import sys" didn't throw exceptions. mp_obj_t m_sys = mp_obj_new_module(MP_QSTR_sys); @@ -515,7 +518,7 @@ mp_obj_t rt_binary_op(int op, mp_obj_t lhs, mp_obj_t rhs) { if (mp_obj_is_exception_instance(lhs)) { lhs = mp_obj_get_type(lhs); } - if (mp_obj_is_subclass(lhs, rhs)) { + if (mp_obj_is_subclass_fast(lhs, rhs)) { return mp_const_true; } else { return mp_const_false; |
