commit | edd165773ff62f82b3633dcde0699793b973a5d2 | [log] [tgz] |
---|---|---|
author | Boris Pavlovic <boris@pavlovic.me> | Thu Jun 19 09:46:20 2014 +0400 |
committer | Boris Pavlovic <boris@pavlovic.me> | Sat Aug 02 17:38:19 2014 +0400 |
tree | 066f64e9f4cd7af30c84e33692d3193125ee4f3c | |
parent | 4063937f848fc77a40185d6459f4ec099b58669c [diff] |
Don't use instances of complex types as a default value in args This can produce unexpected buthurt (at least for me). Cause python has super strange behavior in this case. E.g. def a(t=[]): t.append(1) print(t) a() # prints [1] a() # prints [1, 1] Change-Id: Ie5287dd4c958d2d1ccaf98486b9522a2d2c18724