== A logical consequence of _def_ being an executable statement I've mentioned before that in Python, _def_ is actually an executable statement (in FunctionDefinitionOrder). A logical consequences of this is that default values for function arguments are evaluated only once, when the _def_ runs. I say this because expressions generally get evaluated when *any* Python statement runs, so the expressions in things like '_def foobar(a, b=greeble(c), d=None):_' are not being an exception. The exception would be if they were not evaluated then and were instead preserved as little lambda expressions to be evaluated later. On an interesting side note, setting default values for arguments is one of the two places in Python where the same variable name can be in two different scopes simultaneously; the other is invoking a function with keyword arguments. Everywhere else you write '_a=a_' the two _a_'s are the same, but in these two cases the _a_ being assigned to is in the new function's scope and the expression's _a_ is in your current scope. The result can be a little bit confusing, as you can see in StructsWithDefaults. (Which is one reason I like to avoid it.) === Sidebar: mutable default arguments This means that mutable default arguments are usually not what you want, because if you change them they will *stay* mutated in subsequent invocations of the function. The usual pattern around this is something like: > def foobar(a, deflst=None): > if deflst is None: > deflst = [] > ....