Serhiy Storchaka added the comment:
Current behavior is consistent with str.count():
len(string.split(sep)) == string.count(sep) + 1
and re.split():
re.split(re.escape(sep), string) == string.split(sep)
May be the behavior when sep is None should be changed for consistency with the
behavior when sep is not None?
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28937>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com