]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Missing hint in documentation 1587/head
authorHermann Schachner <hschachn@users.noreply.github.com>
Fri, 20 Nov 2015 12:59:58 +0000 (13:59 +0100)
committerHermann Schachner <hschachn@users.noreply.github.com>
Fri, 20 Nov 2015 12:59:58 +0000 (13:59 +0100)
I did not realize that RequestHandler.initialize() is called before every single request.
For me, 'subclass initialization' suggest that this function were called only once for each subclass definition.
(Seems like I am not the only one: http://stackoverflow.com/questions/15199028/does-initialize-in-tornado-web-requesthandler-get-called-every-time-for-a-reques)

tornado/web.py

index 1cacd7c0a8b82df53bae2a78d5e20966558b6d06..c51d5f68a5cdddf09e9af0a2f449433b3bb8e840 100644 (file)
@@ -183,8 +183,8 @@ class RequestHandler(object):
         self.initialize(**kwargs)
 
     def initialize(self):
-        """Hook for subclass initialization.
-
+        """Hook for subclass initialization. Called for each request.
+          
         A dictionary passed as the third argument of a url spec will be
         supplied as keyword arguments to initialize().