Mutable Default Arguments in Python
Why Python evaluates default arguments once, how mutable defaults retain state between calls, and how the None sentinel pattern avoids the problem.
1 article
Why Python evaluates default arguments once, how mutable defaults retain state between calls, and how the None sentinel pattern avoids the problem.