Serhiy Storchaka added the comment:
re.split = split(pattern, string, maxsplit=0, flags=0)
Split the source string by the occurrences of the pattern,
returning a list containing the resulting substrings. If
capturing parentheses are used in pattern, then the text of all
groups in the pattern are also returned as part of the resulting
list. If maxsplit is nonzero, at most maxsplit splits occur,
and the remainder of the string is returned as the final element
of the list.
maxsplit=0 in your fist example and maxsplit=8 (re.MULTILINE is 8) in your
second example. This is not a bug, this is a wrong understanding.
----------
nosy: +storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15537>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com