This isn't about what I want, just noting that the other way around could sound just as intuitive. Anyway, it's awfully slow already, how much can it hurt ;-)
Sure, there are a lot of subjective aesthetics that go into the spec, but in this case, there are objective reasons for not liking this. It's a well-known footgun that causes bugs. And it's almost never what you want, so you end up doing something like this:
def f(xs = None):
# Are these two lines actually faster than the
# interpreter creating defaults at call time?
if xs is None:
xs = []
...
Do you have any reasons at all for defending this decision?
# Are these two lines actually faster than the
# interpreter creating defaults at call time?
You're proposing that the interpreter add a check for every default parameter in every function signature; that it should optionally fire off arbitrary code for each and every one. And when you consider that high-performance Python involves writing C extensions, your proposal would be to move that check out of the compiled code and into the slow interpreted space is, yes, a major performance hit.
> You're proposing that the interpreter add a check for every default parameter in every function signature
No, that's not what I'm proposing. Why would it check anything? Just evaluate the given default expression at call time. If you don't want the overhead of an expression, don't put a default.
You can also do defaults like:
LIST_OF_X = []
def foo(xs = LIST_OF_X):
...
...if you want the other behavior. This does add a variable lookup (oh no!).