Python decorators in classes Eoor : class A(object):
    def wrapped(self, func):
        func.string = self.get_something()
        return func

    def get_something(self):
        return "something"

    @wrapped
    def main(self):
        print self.main.string
a = A()
a.main()
