r/Python • u/[deleted] • Jul 22 '21
Resource Do not use mutable objects as default arguments in Python
https://medium.com/geekculture/do-not-use-objects-as-default-arguments-in-python-1c940212db2e
1.3k
Upvotes
r/Python • u/[deleted] • Jul 22 '21
3
u/eveninghighlight Jul 22 '21
Maybe - but I feel like it's more likely to just confuse things. There are juniors on my team and i know this kind of thing can just ruin their week
You're right that the blanket "don't" statement isn't technically true, but if you know enough to know when to use this you probably know enough to ignore this kind of medium article