Python’s default arguments are evaluated once when the function is defined, not each time the function is called. This means that if you use a mutable default argument (like list and dict) and mutate it, you will and have mutated that object for all future calls to the function as well. more details about this wrong usage here: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments Change-Id: If187f16bfb305ac4fe6e4177e498a06c49c3f946
14 KiB
14 KiB