From 4e205197dd727e7b33390ce393d9a0928e88505f Mon Sep 17 00:00:00 2001 From: Hermann Schachner Date: Fri, 20 Nov 2015 13:59:58 +0100 Subject: [PATCH] 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) --- tornado/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(). -- 2.47.2