From: Hermann Schachner Date: Fri, 20 Nov 2015 12:59:58 +0000 (+0100) Subject: Missing hint in documentation X-Git-Tag: v4.4.0b1~66^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e205197dd727e7b33390ce393d9a0928e88505f;p=thirdparty%2Ftornado.git Missing hint in documentation 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) --- diff --git a/tornado/web.py b/tornado/web.py index 1cacd7c0a..c51d5f68a 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -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().