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 -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/DWJSRGHICP6AM6BVPVCQLTA5JOC5IJKO/ Code of Conduct: http://python.org/psf/codeofconduct/