[Python-Dev] Re: PEP 616 -- String methods to remove prefixes and suffixes

2020年3月23日 18:08:09 -0700

Cameron Simpson writes:
 > As a diversion, _are_ there use cases where an empty affix is useful or 
 > reasonable or likely?
In the "raise on failure" design,
"aba".cutsuffix('.doc')
raises,
"aba".cutsuffix('.doc', '')
returns "aba".
BTW, since I'm here, thanks for your discussion of context managers
for loop invariants. It was very enlightening.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/DWJSRGHICP6AM6BVPVCQLTA5JOC5IJKO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to