[Python-ideas] str.rreplace

spir denis.spir at gmail.com
Sat Jan 25 09:32:05 CET 2014


On 01/25/2014 07:45 AM, Alexander Heger wrote:
>>> I propose implementing str.rreplace. (It'll be to str.replace what
>>> str.rsplit is to str.split.)
>
> Instead of str.rreplace you could just add a parameter
> 'reverse=False|True' and add the same thing wherever needed, including
> making rfind superfluous.

This is a right way, imo, except that there is no string (/sequence) reversal 
here, but instead backward traversal.

d


More information about the Python-ideas mailing list