[Python-ideas] str.rreplace
Alexander Heger
python at 2sn.net
Sat Jan 25 13:21:42 CET 2014
>> 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.
I suppose a better name could be found. 'traverse_backward=True|False(default)'
For some of the reverse methods problems may occur if they operate on
an iterator rather than an actual list, tuple, or similar.
More information about the Python-ideas
mailing list