ice.py
def match(self, path):
        """Return route handler with arguments if path matches this route.

        Arguments:
          path (str): Request path

        Returns:
          tuple or None: A tuple of three items:

            1. Route handler (callable)
            2. Positional arguments (list)
            3. Keyword arguments (dict)

          ``None`` if the route does not match the path.
        """
        match = self._re.search(path)
        if match is None:
            return None
        kwargs_indexes = match.re.groupindex.values()
        args_indexes = [i for i in range(1, match.re.groups + 1)
                          if i not in kwargs_indexes]
        args = [match.group(i) for i in args_indexes]
        kwargs = {}
        for name, index in match.re.groupindex.items():
            kwargs[name] = match.group(index)
        return self._callback, args, kwargs
def match(self, path):
        """Return route handler with arguments if path matches this route.

        Arguments:
          path (str): Request path

        Returns:
          tuple or None: A tuple of three items:

            1. Route handler (callable)
            2. Positional arguments (list)
            3. Keyword arguments (dict)

          ``None`` if the route does not match the path.
        """
        match = self._re.search(path)
        if match is None:
            return None
        kwargs_indexes = match.re.groupindex.values()
        args_indexes = [i for i in range(1, match.re.groups + 1)
                          if i not in kwargs_indexes]
        args = [match.group(i) for i in args_indexes]
        kwargs = {}
        for name, index in match.re.groupindex.items():
            kwargs[name] = match.group(index)
        return self._callback, args, kwargs
def match ( self , path ) : match = self . _re . search ( path ) if match is None : return None kwargs_indexes = match . re . groupindex . values ( ) args_indexes = [ i for i in range ( 1 , match . re . groups + 1 ) if i not in kwargs_indexes ] args = [ match . group ( i ) for i in args_indexes ] kwargs = { } for name , index in match . re . groupindex . items ( ) : kwargs [ name ] = match . group ( index ) return self . _callback , args , kwargs
Return route handler with arguments if path matches this route.

        Arguments:
          path (str): Request path

        Returns:
          tuple or None: A tuple of three items:

            1. Route handler (callable)
            2. Positional arguments (list)
            3. Keyword arguments (dict)

          ``None`` if the route does not match the path.
Return route handler with arguments if path matches this route .