commit | 0c5498540b2005e39422647d2ca9cad1a4ff731b | [log] [tgz] |
---|---|---|
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sun Aug 10 23:14:35 2014 +0300 |
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Sun Aug 10 23:21:16 2014 +0300 |
tree | d0eb9995904bd219ed58d37287f0cdeec540927d | |
parent | ecca53bd34d946f1015d2e8f4474bcd6a950cbee [diff] [blame] |
objstr: split(): check arg type consistency (str vs bytes). Similar to other methods and following CPython3 strictness.
diff --git a/py/objstr.c b/py/objstr.c index 6ec997f..9d34609 100644 --- a/py/objstr.c +++ b/py/objstr.c
@@ -472,6 +472,9 @@ } 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);