#!/usr/bin/env python3.2 def f1(a, l=[]): l.append(a) return(l) print(f1(1)) print(f1(1)) print(f1(1)) def f2(a, b=1): b = b + 1 return(a+b) prin
Because in f2 the name b is rebound, whereas in f1 the object l is mutated.
f2
b
f1
l