> Just to put my spoke in the wheel, I find the difference in the > ordering of return values for partition() and rpartition() confusing: > > head, sep, remainder = partition(s) > remainder, sep, head = rpartition(s) > > My first expectation for rpartition() was that it would return exactly > the same values as partition(), but just work from the end of the > string. > > IOW, I expected "www.python.org".partition("python") to return exactly > the same as "www.python.org".rpartition("python") Yow. Me too, and indeed I've been skimming this thread without it ever occurring to me that it would be otherwise. > Anyway, I'm definitely +1 on partition(), but -1 on rpartition() > returning in "reverse order". +1. -- g
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