Eric S. Raymond writes: > string.py:# NB: split(s) is NOT the same as splitfields(s, ' ')! > string.py: (split and splitfields are synonymous) > string.py:splitfields = split > > 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? The comment is correct. splitfields(s) is synonymous with split(s), and splitfields(s, ' ') is synonymous with split(s, ' '). If the second arg is omitted, any stretch of whitespace is used as the separator, but if ' ' is supplied, exactly one space is used to split fields. split(s, None) is synonymous with split(s), splitfields(s), and splitfields(s, None). -Fred -- Fred L. Drake, Jr. <fdrake at acm.org> PythonLabs at Digital Creations
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