remove mutable arguments.

This commit is contained in:
Rowan Cockett
2016-04-07 16:35:47 -07:00
parent 0575490f56
commit 3e4f47711c
6 changed files with 59 additions and 19 deletions
+3 -1
View File
@@ -55,8 +55,10 @@ def hook(obj, method, name=None, overwrite=False, silent=False):
print 'Method '+name+' was not overwritten.'
def setKwargs(obj, ignore=[], **kwargs):
def setKwargs(obj, ignore=None, **kwargs):
"""Sets key word arguments (kwargs) that are present in the object, throw an error if they don't exist."""
if ignore is None:
ignore = []
for attr in kwargs:
if attr in ignore:
continue