class SomeClass(object):

    def __init__(self, label):
        self.label = label

def __str__(self):
    return self.label

def __getattr__(self, name):
    if name.startswith('f'):

        def myfunc(self):
            pass
Generic methods in python