Python Arguments __defaults__

There is an interesting example in the Python docs:

# Python 3.5
def f(a, L=[]):
    L.append(a)
    return L

print(f(1))
print(f(2))
print(f(3))
# [1, 2, 3]

You can see how the arguments get stored within defaults in the snippet below:

Python __defaults__