Yes, it probably does, but it proprably retains a reference to the original
Python decorators are nothing more than a callable themselves (a function, or a class instance with a
__call__ method). Whatever that callable returns is used as the definition for the decorated function instead.
If I define a simple no-op decorator like this, that means that I replace the original with.... the original:
@ symbol used for decorators is syntactic sugar, you could also write it as:
class AuthHandler(BaseHandler, tornado.auth.GoogleMixin):
if self.get_argument("openid.mode", None):
get = tornado.web.asynchronous(get)
In the case of the tornado
asynchronous decorator, the decorator probably returns a deferred handler, to handle the decorated function asynchronously, keeping you, the programmer of a tornado-based application, from having to remember the intricacies of how to do that, time and again. In short, it let's you focus on the details of your application instead.