src/license_expression/_pyahocorasick.py
def sort(cls, tokens):
        """
        Return a new sorted sequence of tokens given a sequence of tokens. The
        primary sort is on start and the secondary sort is on longer lengths.
        Therefore if two tokens have the same start, the longer token will sort
        first.

        For example:
        >>> tokens = [Token(0, 0), Token(5, 5), Token(1, 1), Token(2, 4), Token(2, 5)]
        >>> expected = [Token(0, 0), Token(1, 1), Token(2, 5), Token(2, 4), Token(5, 5)]
        >>> expected == Token.sort(tokens)
        True
        """
        key = lambda s: (s.start, -len(s),)
        return sorted(tokens, key=key)

        Return a new sorted sequence of tokens given a sequence of tokens. The
        primary sort is on start and the secondary sort is on longer lengths.
        Therefore if two tokens have the same start, the longer token will sort
        first.

        For example:
        >>> tokens = [Token(0, 0), Token(5, 5), Token(1, 1), Token(2, 4), Token(2, 5)]
        >>> expected = [Token(0, 0), Token(1, 1), Token(2, 5), Token(2, 4), Token(5, 5)]
        >>> expected == Token.sort(tokens)
        True
        
Return a new sorted sequence of tokens given a sequence of tokens. The
primary sort is on start and the secondary sort is on longer lengths.
Therefore if two tokens have the same start, the longer token will sort
first.


Return a new sorted sequence of tokens given a sequence of tokens . The primary sort is on start and the secondary sort is on longer lengths . Therefore if two tokens have the same start the longer token will sort first .
def sort(cls, tokens):
        key = lambda s: (s.start, -len(s),)
        return sorted(tokens, key=key)
def sort ( cls , tokens ) : key = lambda s : ( s . start , - len ( s ) , ) return sorted ( tokens , key = key )
Return a new sorted sequence of tokens given a sequence of tokens.
Return a new sorted sequence of tokens given a sequence of tokens .
"""
        Return a new sorted sequence of tokens given a sequence of tokens. The
        primary sort is on start and the secondary sort is on longer lengths.
        Therefore if two tokens have the same start, the longer token will sort
        first.

        For example:
        >>> tokens = [Token(0, 0), Token(5, 5), Token(1, 1), Token(2, 4), Token(2, 5)]
        >>> expected = [Token(0, 0), Token(1, 1), Token(2, 5), Token(2, 4), Token(5, 5)]
        >>> expected == Token.sort(tokens)
        True
        """
cls
tokens