def foo(data={}): data.update({'key': 'value'}) return data
def foo(data): if not data: data = {'key': 'value'} return data
Used when a mutable value as list or dictionary is detected in a default value for an argument.