How do I add a method with a decorator to a class? I tried
def add_decorator( cls ):
@dec
def update(self):
pass
cls.update = update
usage
add_decorator( MyClass )
MyClass.update()
but MyClass.update does not have the decorator
@dec did not apply to update
I'm trying to use this with orm.reconstructor
in sqlalchemy.