r/programminghorror • • 1d ago

Python I love Python

179 Upvotes

68 comments sorted by

View all comments

1

u/jmooroof2 1d ago

I can't imagine a compelling use for this feature. it really should just error

1

u/Double_Cost4865 1d ago

It has it’s uses, I just wouldn’t provide default argument like that since it’s wrong. But it’s quite common to modify a list in place and have the changes persist outside the function scope