[issue1123] split(None, maxsplit) does not strip whitespace correctly

Fredrik Lundh report at bugs.python.org
Tue Sep 11 00:41:05 CEST 2007


Fredrik Lundh added the comment:

But wasn't your complaint that the implementation didn't match the
documentation?

As I said, the *implementation* treats "runs of whitespace" as
separators, except for whitespace at the beginning or end (or in other
words, it never returns empty strings).  That matches the documentation,
except for the "first" in "first, whitespace characters are stripped
from both ends".   As far as I can tell, the documentation has never
matched the implementation here.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1123>
__________________________________


More information about the Python-bugs-list mailing list