The trackpoint on Thinkpads is fantastic once you get used to it.
class Base:
def func(self):
print("In Base.func:", self.name)
class Child:
def __init__(self, name):
self.name = name
func = Base.func
c = Child("Foo")
c.func() #=> In Base.func: Foo default = 10
def foo(x=default):
return x
default = 20
assert foo() == 10
I think tat makes a lot of sense. def foo(x=create_default(y, z))
By evaluating it at definition time we only have to evaluate the expression once and not have this weird lazy expression.