Eric V. Smith <[email protected]> added the comment:
This is working as designed. The error is telling you that the argument to
bytes.split() must be a string:
>>> b''.split(',')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'str'
>>> b''.split(b',')
[b'']
Same for str.split():
>>> ''.split(b',')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: must be str or None, not bytes
>>> ''.split(',')
['']
----------
components: -Argument Clinic
nosy: +eric.smith -larry
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45087>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com