class Func(object):

    def __init__(self, func):
        self._func = func

def __call__(self, x):
    return self._func(x)

def __mul__(self, other):
    return Func(lambda x: self(x) * other(x))

def __add__(self, other):
    return Func(lambda x: self(x) + other(x))

def __sub__(self, other):
    return Func(lambda x: self(x) - other(x))
Programmatically create arithmetic special methods in Python, (aka factory function HOWTO)