[docs] re.split is underspecified

Rodney Polkinghorne rodneyp at physics.uq.edu.au
Wed Mar 23 23:47:28 CET 2011


Dear maintainers

Refer to < http://docs.python.org/library/re.html#re.split >:

   Split string by the occurrences of pattern. If capturing
parentheses are used ...

Please add a second sentence, "If string is empty, return a list of an
empty string, not an empty list."

Ideally, the reference should specify the value returned by
split("aba+", "ababaa").  I suggest you replace "occurences" with
"leftmost, longest occurences".


Regards

Rodney Polkinghorne


More information about the docs mailing list