def on_action(action):
    """Decorator for action handlers.

    :param str action: explicit action name

    This also decorates the method with `tornado.gen.coroutine` so that
    `~tornado.concurrent.Future` can be yielded.
    """
    @wrapt.decorator
    @tornado.gen.coroutine
    def _execute(wrapped, instance, args, kwargs):
        return wrapped(*args, **kwargs)

    _execute.action = action
    return _execute
def on_action ( action ) : @ wrapt . decorator @ tornado . gen . coroutine def _execute ( wrapped , instance , args , kwargs ) : return wrapped ( * args , ** kwargs ) _execute . action = action return _execute
Decorator for action handlers.

    :param str action: explicit action name

    This also decorates the method with `tornado.gen.coroutine` so that
    `~tornado.concurrent.Future` can be yielded.