I have a method like so
def update_count(target, value, initiator):
target.count = len(target.collection)
However, I have three decorator functions I wish to apply it to
@event.listens_for(MyClass.collection, 'append')
@event.listens_for(MyClass.collection, 'remove')
@event.listens_for(MyClass.collection, 'set')
Instead of copying the whole method below each decorator, what is a pythonic way to pass update_count
to each of the event.listens_for
decorator methods as a reference?