On 9/5/06, Fred L. Drake, Jr. <[EMAIL PROTECTED]> wrote:

>     S.partition(sep) -> (head, sep, rest)
>     S.rpartition(sep) -> (tail, sep, rest)

> Here, "rest" is always used for "what remains"; head/tail are somewhat more
> clear here I think.

Then shouldn't rpartition be S.rpartition(sep) -> (rest, sep, tail)

Another possibility is data (for head/tail) and unparsed (for rest).

    S.partition(sep) -> (data, sep, unparsed)
    S.rpartition(sep) -> (unparsed, sep, data)

I'm not sure which is worse --
(1)  distinguishing between tail and rest
(2)  using (overly generic) jargon like unparsed and data.

Whatever the final decision, it would probably be best to add an
example to the docstring.   "a.b.c".rpartition(".") -> ("a.b", ".",
"c")

-jJ
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to