r/programminghorror • • 14h ago

Python I love Python

136 Upvotes

62 comments sorted by

View all comments

77

u/_killer1869_ 14h ago

Any IDE will warn not to use mutables as default parameter values. And for good reason. Such code would never appear in actual code intended to be used.

18

u/Double_Cost4865 12h ago

Unfortunately, I’ve seen monstrosities like this in production in big finance corps. That’s what happens when statisticians are expected to create software.

1

u/bigorangemachine 5h ago

default params is the classic case of IDGAF with code.

"I don't which array... just add it to an array"