[Python-Dev] Fwd: Problem withthe API for str.rpartition()
Jim Jewett
jimjjewett at gmail.com
Tue Sep 5 22:43:20 CEST 2006
I think I finally figured out where Raymond is coming from.
For Raymond, "head" is where he started processing -- for rpartition,
this is the .endswith part.
For me, "head" is the start of the data structure -- always the
.startswith part.
We won't resolve that with anything suggesting a sequential order; we
need something that makes it clear which part is the large leftover.
S.partition(sep) -> (record, sep, remains)
S.rpartition(sep) -> (remains, sep, record)
I do like the plural (or collective) sound of "remains".
I have no solid reasoning for "record" vs "rec" vs "onerec". I would
welcome a word that did not suggest it would have further internal
structure.
-jJ
More information about the Python-Dev
mailing list