Barry A. Warsaw added the comment: On Dec 11, 2016, at 03:32 PM, Serhiy Storchaka wrote:
>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) Yep. My suggestion is a straight up 'practicality beats purity' request. >May be the behavior when sep is None should be changed for consistency with >the behavior when sep is not None? I'm very strongly -1 on changing any existing behavior. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28937> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com