@soulitzer, hmm … never wrote such code with a counter as a default argument, can it be zeroed ?
like some code which will do:
fns = []

for i in range(10):
    def fn(x = [0]):
        x[0] += 1
        print(x[0])
    fns.append(fn)

fns[0]() # 1
fns[1]() # 1
fns[2]() # 1

fns[0]() # 2

'some_zero_code()'
fns[0]() # 0