def set_sort(self, sort): """Set the sort order future results will be delivered in :param sort: Sort order (see :attr:`Query.SORT`) """ self._assert_query_is_initialized() self.sort = sort nmlib.notmuch_query_set_sort(self._query, sort)
def set_sort(self, sort): """Set the sort order future results will be delivered in Wraps the underlying *notmuch_query_set_sort* function. :param sort: Sort order (see :attr:`Query.SORT`) :returns: Nothing :exception: :exc:`NotmuchError` STATUS.NOT_INITIALIZED if query has not been initialized. """ if self._query is None: raise NotmuchError(STATUS.NOT_INITIALIZED) self.sort = sort nmlib.notmuch_query_set_sort(self._query, sort)