fixes #782

Using an immutable function default is more Pythonic.