__call__ method. This is the method used when you call an object like a function. You should recognize this as the WSGI signature. line 14 : We create a request object. Note we'll only use this request object in this function; if the controller wants a request object it'll have to make on of its own. line 16 : We test the regular expression against req.path_info . This is the same as environ['PATH_INFO'] . That's all the request path left to be processed. line 18 : We set req.urlvars to the dictionary of matches in the regular expression. This variable actually maps to environ['wsgiorg.routing_args'] . Any attributes you set on a request will, in one way or another, map to the environment dictionary: the request holds no state of its own. line 19 : We also add in any explicit variables passed in through add_route() . line 20 : Then we call the controller as a WSGI application itself. Any fancy framework stuff the controller wants to do, it'll have to do itself. line 21 : If nothing matches, we return a 404 Not Found response. webob.exc.HTTPNotFound() is a WSGI application that returns 404 responses. You could add a message too, like webob.exc.HTTPNotFound('No route matched') . Then, of course, we call the application. The router just passes the request on to the controller, so the controllers are themselves just WSGI applications. But we'll want to set up something to make those applications friendlier to write. To do that we'll write