aboutsummaryrefslogtreecommitdiff
path: root/py/runtime.c
diff options
context:
space:
mode:
authorDamien George2014-03-03 22:12:32 +0000
committerDamien George2014-03-03 22:12:32 +0000
commit2ab1797d1d6f6b7590f7a0a8146b46ffe7bcb2f2 (patch)
treea8e45a23c469ea56390535001f423892ad8d572a /py/runtime.c
parent61f9b1c6217d2371e01638354c852913e071fbea (diff)
parente74f52b76c2be9aefca689e34cd05f8f64be02f8 (diff)
Merge pull request #332 from pfalcon/namedtuple
Implement collections.namedtuple
Diffstat (limited to 'py/runtime.c')
-rw-r--r--py/runtime.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c
index ca08ce3d1..0de161b08 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);