On Sun, Mar 22, 2020 at 9:54 AM Christopher Barker <[email protected]> wrote:
> On Sun, Mar 22, 2020 at 2:08 AM Barry Scott <[email protected]> > wrote: > >> >>> Should `-+-+-+Spam'.stripprefix('-+') remove just the first >> occurence? All of them? Does it need a 'count' parameter? >> >> The only ways to use this function without counting is remove 1 prefix >> or remove all. >> > Please, please. removeprefix/removesuffix do not need a count. The use case is quite different from that of replace. And they should only remove (at most) one prefix or suffix. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ 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/VD2JAWUKCBZKNEBPOLIK2HW45OW32AKD/ Code of Conduct: http://python.org/psf/codeofconduct/
