(self, code=500)
return wrapper
Decorator: Register an output handler for a HTTP error code
Decorator: Register an output handler for a HTTP error code
Decorator : Register an output handler for a HTTP error code
def error(self, code=500):
        """ Decorator: Register an output handler for a HTTP error code"""
        def wrapper(handler):
            self.error_handler[int(code)] = handler
            return handler
        return wrapper
def error ( self , code = 500 ) : def wrapper ( handler ) : self . error_handler [ int ( code ) ] = handler return handler return wrapper