On Wed, 20 May 2020 at 11:34, Alex Hall <[email protected]> wrote:

> On Wed, May 20, 2020 at 2:46 AM Cameron Simpson <[email protected]> wrote:
>
>> On 19May2020 15:43, David Mertz <[email protected]> wrote:
>> Reiterating the Python 3.9 suggestion, what about:
>>
>>   salt2 = salt.cutsuffix(('==', '='))
>>
>
> But if the API was there, I agree this would work, not sure what David is
> saying about needing to call twice. On the other hand, this example
> demonstrates well how a tuple is potentially confusing. What happens if you
> call `'abc=='.removesuffix(('=', '=='))`?
>

I assume that was the practical "how to do it now":

foobar.removesuffix('=').removesuffix('=')

would work right now in 3.9 (I think).


> _______________________________________________
> Python-ideas mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/R6GIYPOULXBPWU2TO2ZLTNEUMILI5Z2B/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/FFRPCZP3RHNCD3SAO3ZM5AH4VJCX5B2E/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to