9 Feb
2001
9 Feb
'01
8:04 p.m.
On Fri, Feb 09, 2001 at 03:03:29PM -0500, Eric S. Raymond wrote:
Pursuant to a conversation Guido and I had in New York, I have gone through string.py:# NB: split(s) is NOT the same as splitfields(s, ' ')!
It certainly looks to me as though the "NB" comment is out of date. Is there some subtle and wicked reason it has not been removed?
Actually I think it's correct:
import string string.split('a b c') ['a', 'b', 'c'] string.split('a b c', ' ') ['a', '', 'b', 'c']
With no separator, it splits on runs of whitespace. With an explicit separator, it splits on *exactly* that separator. --amk