[Python-Dev] Fwd: Problem withthe API for str.rpartition() (original) (raw)

Barry Warsaw barry at python.org
Tue Sep 5 22:17:20 CEST 2006


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

On Sep 5, 2006, at 4:13 PM, Raymond Hettinger wrote:

Tim Peters wrote:

upto, sep, rest

in whatever order they apply. In the rpartition case, that would be (rest, sep, upto) which seems a bit cryptic. We need some choice of words that clearly mean: * the chopped-off snippet (guaranteed to not contain the separator) * the separator if found * the unchopped remainer of the string (which may contain a separator). Of course, if a clear example is added, the choice of words becomes much less important.

Ideally too, the terminology (and order) for partition and rpartition
would be the same.

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin)

iQCVAwUBRP3bVXEjvBPtnXfVAQJSKwP9Ev3MPzum3kp4hNDJZyBmEShzPvL2WQv2 VThbxZX1MDfeDXupNwF22bFA5gF/9vZp3nToUqyAbOaPSd93hJSHOdeWdAhR2BdT EICkzBTGCtVkbqu3Ep1N/jb9GJUvgkgNAWtRZVuTWQtJc6AanV9ssTcF6F7ipc6p zgSWeAc0a3E= =W7LV -----END PGP SIGNATURE-----



More information about the Python-Dev mailing list