News for hackers. Stuff that matters.
Re:Strict Python function parameters by aix1 on Sunday January 23, 2022 @11:27AM (#30047436)
I agree that it's unfortunate that this is the default behaviour. It's just so unexpected when first encountered.

That said, it is not always desirable that a new object is created each time the function is called without the arg. One obvious example is when the default is an immutable object that's either large or expensive to construct.

There are no comments on this comment yet.