Re:Strict Python function parameters
by remexre on Sunday January 23, 2022 @01:04PM
(#30048520)
Common Lisp takes expressions for default arguments, and has the "fixed" behavior; when one wants a persistent value, they do either:
or, more often, just make it a special variable of some sort:
This seems to work fine, and brings attention to "I have an object that supports mutation, and I'm actually going to mutate it," which is an unusual enough case to be worth calling out.
[ Parent
| on HN ]