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/stevenjd Jul 23 '21
It's great to see Redditors and their teams still using bug magnets from the dark days of Python 1.5 in their code in 2021, fifteen years after conditional expressions were added to the language.
(Presumably just to save a few characters.)
Never change Reddit!