[Python-ideas] Revisiting str.rreplace()

Calvin Spealman cspealma at redhat.com
Thu Jul 19 10:01:14 EDT 2018


As an alternative suggestion: What if the count parameter to str.replace()
counted from the right with negative values? That would be consistent with
other things like indexing and slicing.

On Thu, Jul 19, 2018 at 9:47 AM, Eric Fahlgren <ericfahlgren at gmail.com>
wrote:

> On Wed, Jul 18, 2018 at 8:20 PM Graham Gott <graham.gott.software at gmail.
> com> wrote:
>
>>
>> Thoughts? Support/oppose?
>>
>
>> +1, along with an overall rework of str methods to make them more
> consistent.
>
> The find, replace and split families should all gain the same
> tuple-as-search-string that endswith and startswith use.  (Discussed in the
> last year, I'm too lazy to look up references...)
>
>>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180719/2391f745/attachment.html>


More information about the Python-ideas mailing list