class Add(CBack):

    def __call__(self, x, y):
        return x + y


class Mul(CBack):

    def __call__(self, x, y):
        return x * y
print(callF(Add(), 3, 7))
print(callF(Mul(), 3, 7))
Using SWIG for functions with functions as input parameter