Sometimes it seems natural to have a default parameter which is an empty list. Yet Python gives unexpected behavior in these situations.
If for example, I have a function:
def myFunc(working_list = []):
working_list.append("a")
print working_list
The first time it is called with the default will work, but calls after that will use a constantly updating list.
So, what is the pythonic way to get the behavior I desire (a fresh list on each call)?