Error with python decorator
- by Timmy
I get this error
object has no attribute 'im_func'
with this
class Test(object):
def __init__(self, f):
self.func = f
def __call__( self, *args ):
return self.func(*args)
pylons code:
class TestController(BaseController):
@Test
def index(self):
return 'hello world'