(self)
return OrderBy(self[1:]) if self.is_descending else OrderBy("-" + self)
Provides the opposite of the current sorting direction.

        Returns:
            `.OrderBy`: object with an opposite sort influence.

        Example::

            >>> order_by = OrderBy('name')
            >>> order_by.opposite
            '-name'
Provides the opposite of the current sorting direction.
Provides the opposite of the current sorting direction .
def opposite(self):
        """
        Provides the opposite of the current sorting direction.

        Returns:
            `.OrderBy`: object with an opposite sort influence.

        Example::

            >>> order_by = OrderBy('name')
            >>> order_by.opposite
            '-name'

        """
        return OrderBy(self[1:]) if self.is_descending else OrderBy("-" + self)
def opposite ( self ) : return OrderBy ( self [ 1 : ] ) if self . is_descending else OrderBy ( "-" + self )