py: Get rid of assert() in method argument checking functions.
Checks for number of args removes where guaranteed by function descriptor, self checking is replaced with mp_check_self(). In few cases, exception is raised instead of assert.
This commit is contained in:
@@ -49,7 +49,7 @@ STATIC mp_obj_t map_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_
|
||||
}
|
||||
|
||||
STATIC mp_obj_t map_iternext(mp_obj_t self_in) {
|
||||
assert(MP_OBJ_IS_TYPE(self_in, &mp_type_map));
|
||||
mp_check_self(MP_OBJ_IS_TYPE(self_in, &mp_type_map));
|
||||
mp_obj_map_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
mp_obj_t *nextses = m_new(mp_obj_t, self->n_iters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user