I\'ve read that it is possible to add a method to an existing object (i.e., not in the class definition) in Python.
I understand that it\'s not always good to do so
from types import MethodType def method(self): print 'hi!' setattr( targetObj, method.__name__, MethodType(method, targetObj, type(method)) )
With this, you can use the self pointer