[Python-Dev] Bug 911080, string split oddness
Greg Ewing
greg at cosc.canterbury.ac.nz
Sun Mar 7 19:03:53 EST 2004
Jeff Epler <jepler at unpythonic.net>:
> I think the current version documentation intends to explain the
> no-argument form with this sentence:
> If sep is not specified or None, any whitespace string is a separator.
> [http://python.org/doc/current/lib/string-methods.html#l2h-197]
I'm inclined to agree with Pete Shinners that the above
explanation is perhaps a little too compressed.
Maybe "any string of consecutive whitespace characters is a
separator". Perhaps with an explicit note that this is NOT
equivalent to .split(" \t\n") and the reason why.
Pete Shinners <pete at shinners.org>:
> I suppose split either needs another optional argument or a
> different split method. (splitgroup? splitseq?)
splitany? (splits on "any" of the chars in the arg)
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Python-Dev
mailing list