objstr: Add TODO-optimize for using .join with arbitrary iterable.

This commit is contained in:
Paul Sokolovsky 2014-04-10 01:42:40 +03:00
parent 87bb093eb6
commit 881d9af05e
1 changed files with 1 additions and 0 deletions

View File

@ -330,6 +330,7 @@ STATIC mp_obj_t str_join(mp_obj_t self_in, mp_obj_t arg) {
} else { } else {
if (!MP_OBJ_IS_TYPE(arg, &mp_type_list)) { if (!MP_OBJ_IS_TYPE(arg, &mp_type_list)) {
// arg is not a list, try to convert it to one // arg is not a list, try to convert it to one
// TODO: Try to optimize?
arg = mp_type_list.make_new((mp_obj_t)&mp_type_list, 1, 0, &arg); arg = mp_type_list.make_new((mp_obj_t)&mp_type_list, 1, 0, &arg);
} }
mp_obj_list_get(arg, &seq_len, &seq_items); mp_obj_list_get(arg, &seq_len, &seq_items);