diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-08-02 17:56:44 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-08-02 17:57:31 -0400 |
| commit | 7ce3776b8086abbe0d01056651904a59bf4f8bec (patch) | |
| tree | d00f8bb26f27b9d52f847b146b3c7af68460d4fb /py/objlist.c | |
| parent | ee518b9141a4218b4f5f461d1e72621b6be5da81 (diff) | |
WIP: rework of Characteristic properties; enhance Descriptor; not tested
Diffstat (limited to 'py/objlist.c')
| -rw-r--r-- | py/objlist.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/objlist.c b/py/objlist.c index 558c4c611..ea38e64e5 100644 --- a/py/objlist.c +++ b/py/objlist.c @@ -68,6 +68,11 @@ STATIC mp_obj_t list_extend_from_iter(mp_obj_t list, mp_obj_t iterable) { return list; } +mp_obj_t mp_obj_new_list_from_iter(mp_obj_t iterable) { + mp_obj_t list = mp_obj_new_list(0, NULL); + return list_extend_from_iter(list, iterable); +} + STATIC mp_obj_t list_make_new(const mp_obj_type_t *type_in, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) { (void)type_in; mp_arg_check_num(n_args, kw_args, 0, 1, false); |
