On Mon, Mar 14, 2022 at 11:08:51PM -0400, David Mertz, Ph.D. wrote:

> On the other hand, looking through those examples in a cursory manner made
> me think about 75% of the time "why are they doing this silly approach?"

https://fs.blog/chestertons-fence/

Describing this as "silly" seems, well, silly. What else are you to do 
when you have a record (a, b, c, d) and need a record (a, b, x, d)?

There are only two approaches: mutate in place or create a new record.
Which one you do depends on whether you have a mutable or immutable 
record, and which of those you have depends on parts of the code you 
can't see in your cursory glance.


-- 
Steve
_______________________________________________
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/KLRT3YKK6DB3TXJVBELKYJ6QWZY3QCI6/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to