Python Mutable Default Arguments

Python evaluates default argument expressions once, at function definition time. A mutable default such as a list or dictionary is therefore shared by calls that omit that argument.