class Test:

    def __init__(self, nr):
        self.obj = self.create(nr)
print(self.obj.name)
print(self.obj.f1(2))

def create(self, nr):
    obj = Struct(str(nr), *get_func(nr))
return obj
test = Test(1)
Python: Lambda function as a namedtuple object?