def _add_route(self, method, path, middleware=None):
        """The implementation of adding a route"""
        if middleware is not None:
            self.add(method, path, middleware)
            return self
        else:
            # return a lambda that will return the 'func' argument
            return lambda func: (
                self.add(method, path, func),
                func
            )[1]
def _add_route ( self , method , path , middleware = None ) : if middleware is not None : self . add ( method , path , middleware ) return self else : return lambda func : ( self . add ( method , path , func ) , func ) [ 1 ]
The implementation of adding a route