'Initializer.
Args:
expressions: An iterable of SortExpression representing a
multi-dimensional sort of Documents.
match_scorer: A match scorer specification which may be used to
score documents or in a SortExpression combined with other features.
limit: The limit on the number of documents to score or sort.
Raises:
TypeError: If any of the parameters has an invalid type, or an unknown
attribute is passed.
ValueError: If any of the parameters has an invalid value.'

def __init__(self, expressions=None, match_scorer=None, limit=1000):

    self._match_scorer = match_scorer
    self._expressions = _GetList(expressions)
    for expression in self._expressions:
        if (not isinstance(expression, SortExpression)):
            raise TypeError(('expression    must    be    a    SortExpression,    got    %s' % expression.__class__.__name__))
    self._limit = _CheckSortLimit(limit)
