import doctest
def foo(bar=[]):
"""Error: Default argument is mutable.
Default argument values are evaluated only once at function definition time,
which means that modifying the default value of the argument will affect
all subsequent calls of the function.
>>> foo()
['baz']
>>> foo()
['baz', 'baz']
>>> foo()
['baz', 'baz', 'baz']
"""
bar.append("baz")
print bar
doctest.testmod()