You don't have to write anything so complicated to see that Python
doesn't work the way you want it to work. For instance,
def add_one(x):
x = x + 1
x = 1
add_one(x)
print x # prints 1, not 2
If you really want to write 'setFunction', you'll have to do it
something like this:
def setFunction(self, funcname, tofunc):
setattr(self, funcname, tofunc)
# OR
# self.__dict__[funame] = tofunc
and call it like this:
a.setFunction('myPrint', self.newPrint)
This is really a very odd thing to do, though...
Jeff