Reversing the order of the return tuple will break the alignment with
split/rsplit.

Why not just change which of the three strings holds the remainder in
the not-found case?

In rc1,

    "d".rpartition(".") --> ('d', '', '')

If that changes to

    "d".rpartition(".") --> ('', '', 'd')

then
(1)  the loop will terminate
(2)  rpartition will be more parallel to partition (and split),
(3)  people who used rpartition without looping to termination (and
therefore didn't catch the problem) will still be able to use their
existing working code.
(4)  the existing docstring would remain correct, though it could
still be improved.  (It says "returns S and two empty strings", but
doesn't specify the order.)

-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