Seems fine to me. If the default expression causes side effects, then that's what I would expect.
>This kind of function is fine in Python because it's unidiomatic to mutate your parameters, you do obj.mutate() not mutate(obj).
I first wrote Python over 10 years ago and I never learned this.
How would you idiomatically write a function/method which mutates >1 parameter?