New submission from Tim Gordon: >From the docs for str.split: "If sep is not specified or is None... First, whitespace characters are stripped from both ends. Then, words are separated by arbitrary length strings of whitespace characters."
However, ' a b c '.split(None, 1) returns ['a', 'b c '] indicating that the "stripped from both ends" isn't taking place, but that it's removing whitespace as it goes and never gets to the end as it stops parsing when it hits the first split. Note this is easily worked around by calling str.strip().split(None, 1), but it would be good not to have to. I've tested this on windows version 2.5, and 2.4.4 for Debian ---------- messages: 56237 nosy: QuantumTim severity: normal status: open title: str.split possible bug type: behavior versions: Python 2.4, Python 2.5 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1240> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com