 <p>It seems like your question boils down to "how can I dynamically add a method to an object", the the short answer is don't do it (1). Objects can have attributes which can be functions, and that's fine, but these functions do not become methods and don't behave like methods. For example if <code>foo.attr is sum</code> then <code>foo.attr(x)</code> is the same as <code>sum(x)</code> not <code>sum(foo, x)</code>.</p> <p>Your question has a certain functional "aroma" to it, if you wanted to drop the class/object stuff and go the fully functional route you could do something like this:</p> <pre><code>def identity(x): return x def f(n): return [i for i in range(1, 10) if (n % i == 0)] def s(factors): return (len(factors) == 2) def foo(func, helper=identity): def innerfunc(n): return func(helper(n)) return innerfunc a = foo(f) print a(6) # [1, 2, 3, 6] b = foo(s, a) print b(5) # True </code></pre> <p>If that doesn't appeal to you, I would suggest thinking of the <code>func</code> and <code>parent</code> attributes on your <code>Foo</code> class as data attached to your objects, not as methods, and work out the problem from there. The logic associated with your class should live inside proper methods. These methods can refer to the data as needed. Here's my very simple example:</p> <pre><code>class Foo(object): def __init__(self, func, parent=None): self.func = func self.parent = parent def run(self, n): if self.parent is None: return self.func(n) else: return self.func(self.parent.run(n)) a = Foo(f) print a.run(6) # [1, 2, 3, 6] b = Foo(s, a) print b.run(5) # True </code></pre> <p>(1) Methods belong to a class not an object, so the question should really be how can I attach something to my object that behaves like a method.</p>