I see this on other places on your changes as well, but it is generally not a good idea to have parameters of a function default to a mutable such as a list. When the value is changed in the content of the function later on, later calls will have the new value by default as well, because the reference to the value stays the same.

Example:

```python
>>> def a(b=[]):
...     b.append(1)
...     print b
...
>>> a()
[1]
>>> a()
[1, 1]
```

Best and accepted way to circumvent this, is by doing something like this:

```python
def foo(bar=None):
    if bar is None:
        bar = []

    # The rest here
```