The problem is that the default argument is mutable.
def f(a=[]):
a.append('v')
print a
f(['ok']) # ['ok', 'v']
f() # ['v']
f() # ['v', 'v']