From d08fd6866462a4544a938773285b18ab4d7d0970 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 27 Feb 2014 22:22:04 +0200 Subject: Add basic collections.namedtuple implementation. --- py/runtime.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py/runtime.c') diff --git a/py/runtime.c b/py/runtime.c index ca08ce3d1f..0de161b08b 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); -- cgit v1.2.3