diff options
author | Damien George <damien.p.george@gmail.com> | 2014-02-02 22:07:44 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-02-02 22:07:44 +0000 |
commit | 4acb2452b30f6a8bbcf8fe46b05e56bb470a7026 (patch) | |
tree | da36c8ed709f0be395c2f81a8f589126eeb7af07 /py/runtime.c | |
parent | 0473e2790b87b17ad5e065873b771d159cad577a (diff) | |
download | micropython-4acb2452b30f6a8bbcf8fe46b05e56bb470a7026.tar.gz micropython-4acb2452b30f6a8bbcf8fe46b05e56bb470a7026.zip |
py: Add very basic implementation of dir() builtin.
Only works on modules and class instances.
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index 1ba0211806..7a6a44475f 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -141,6 +141,7 @@ void rt_init(void) { mp_map_add_qstr(&map_builtins, MP_QSTR_bytes, (mp_obj_t)&mp_builtin_bytes_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_callable, (mp_obj_t)&mp_builtin_callable_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_chr, (mp_obj_t)&mp_builtin_chr_obj); + mp_map_add_qstr(&map_builtins, MP_QSTR_dir, (mp_obj_t)&mp_builtin_dir_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_divmod, (mp_obj_t)&mp_builtin_divmod_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_eval, (mp_obj_t)&mp_builtin_eval_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_hash, (mp_obj_t)&mp_builtin_hash_obj); |