| commit | b49f3e32a2abf7f7d537cbefa8ee0a057ece58b0 | [log] [tgz] |
|---|---|---|
| author | martin f. krafft <madduck@madduck.net> | Mon Dec 02 10:46:55 2013 +0100 |
| committer | martin f. krafft <madduck@madduck.net> | Mon Dec 02 10:51:44 2013 +0100 |
| tree | 1bdba8e027e0b76614990ef4baa42ab71b2c5f13 | |
| parent | 50a879301ea3d27437235e0d25607eb8b1796b56 [diff] |
Do not use instance of dict() as default for seen
Classic mistake:
def foo(arg={}):
…
this will instantiate a dict and use *the same instance* on subsequent
invocations, i.e. as if you used foo.arg inside the function.
Instead, instantiate the dict() in the function body!
Signed-off-by: martin f. krafft <madduck@madduck.net>