On 2022-03-09 19:42, wfdc via Python-ideas wrote:
Add a "replace" method to tuples that returnsa new tuple with the element at a
given index replaced with a given value.
Hmm, no one appears to have mentioned DateTime.replace(). Did I miss it?
https://docs.python.org/3/library/datetime.html#datetime.date.replace
I think it demonstrates that this is a valid and useful pattern. Agree that I
don't often have a need, but am glad it exists.
-Mike
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/AV6VWQPHIJ4JELLHXBPFDRSWZEZ2XGY5/
Code of Conduct: http://python.org/psf/codeofconduct/