On Mon, Mar 23, 2020 at 3:53 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. > > > I imagine that the count=1 is the most common use case for replace() anyway, >
Do you mean "other than not specifying the count", or do you actually mean that it's more common than replacing all? Because in my experience, replacing all is *by far* the most common case - but yes, replacing just one would be the next most common. ChrisA _______________________________________________ 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/COFLPPUORH3IHXZAHUAV6ASQRTPW7CDU/ Code of Conduct: http://python.org/psf/codeofconduct/
