'Register an event handler.
:param event: the event, either `\'commit\'` or `\'rollback\'`
:param func: a callable object, called with no argument after the
event occurs
Be careful when coding an event handler, since any operation on the
cursor that was just committed/rolled back will take place in the
next transaction that has already begun, and may still be rolled
back or committed independently. You may consider the use of a
dedicated temporary cursor to do some database operation.'

@check
def after(self, event, func):

    self._event_handlers[event].append(func)
