Commit 0c549854 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

objstr: split(): check arg type consistency (str vs bytes).

Similar to other methods and following CPython3 strictness.
parent ecca53bd
......@@ -472,6 +472,9 @@ STATIC mp_obj_t str_split(uint n_args, const mp_obj_t *args) {
} else {
// sep given
if (mp_obj_get_type(sep) != self_type) {
arg_type_mixup();
}
uint sep_len;
const char *sep_str = mp_obj_str_get_data(sep, &sep_len);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment