by nitroll · 4y ago · 0 comments
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: FooReally though it's a structure that only makes sense in strongly typed languages, so I probably shouldn't have used Python to illustrate the idea.