A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-March/042943.html below:

[Python-Dev] Bug 911080, string split oddness

[Python-Dev] Bug 911080, string split oddnessGreg 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4