现象
def foo(x, y=[]): y.append(x) return y print(foo(1)) print(foo(1, [3, 4])) print(foo(5)) ''' [1] [3, 4, 1] [1, 5] '''
see also:
http://www.cnblogs.com/JetpropelledSnake/p/9105286.html
http://cenalulu.github.io/python/default-mutable-arguments/
https://pythonguidecn.readthedocs.io/zh/latest/writing/gotchas.html