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
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