#NEWLINE# def removeRoute( self , method , route , handler = None , resource = None ) : #NEWLINE# #INDENT# "\n        Remove a route from the handler and documentation.\n\n        :param method: The HTTP method, e.g. 'GET', 'POST', 'PUT'\n        :type method: str\n        :param route: The route, as a list of path params relative to the\n                      resource root. Elements of this list starting with ':'\n                      are assumed to be wildcards.\n        :type route: tuple[str]\n        :param handler: The method called for the route; this is necessary to\n                        remove the documentation.\n        :type handler: function\n        :param resource: the name of the resource at the root of this route.\n        " #NEWLINE# self . _ensureInit ( ) #NEWLINE# nLengthRoutes = self . _routes [ method . lower ( ) ] [ len ( route ) ] #NEWLINE# for i in range ( len ( nLengthRoutes ) ) : #NEWLINE# #INDENT# if ( nLengthRoutes [ i ] [ 0 ] == route ) : #NEWLINE# #INDENT# del nLengthRoutes [ i ] #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( ( nLengthRoutes is None ) and hasattr ( self , 'resourceName' ) ) : #NEWLINE# #INDENT# resource = self . resourceName #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( resource is None ) : #NEWLINE# #INDENT# resource = handler . __module__ . rsplit ( '.' , 1 ) [ ( - 1 ) ] #NEWLINE# #UNINDENT# #UNINDENT# if ( handler and ( getattr ( handler , 'description' , None ) is not None ) ) : #NEWLINE# #INDENT# docs . removeRouteDocs ( resource = resource , route = route , method = method , info = handler . description . asDict ( ) , handler = handler )