Returns all the elements in the sorted set at key with a score
        between min and max (including elements with score equal to min or
        max). The elements are considered to be ordered from low to high
        scores.

        The elements having the same score are returned in lexicographical
        order (this follows from a property of the sorted set implementation in
        Redis and does not involve further computation).

        The optional ``offset`` and ``count`` arguments can be used to only get
        a range of the matching elements (similar to SELECT LIMIT offset, count
        in SQL). Keep in mind that if offset is large, the sorted set needs to
        be traversed for offset elements before getting to the elements to
        return, which can add up to ``O(N)`` time complexity.

        The optional ``with_scores`` argument makes the command return both the
        element and its score, instead of the element alone. This option is
        available since Redis 2.0.

        **Exclusive intervals and infinity**

        ``min_score`` and ``max_score`` can be ``-inf`` and ``+inf``, so that
        you are not required to know the highest or lowest score in the sorted
        set to get all elements from or up to a certain score.

        By default, the interval specified by ``min_score`` and ``max_score``
        is closed (inclusive). It is possible to specify an open interval
        (exclusive) by prefixing the score with the character ``(``. For
        example:

        .. code::

            ZRANGEBYSCORE zset (1 5

        Will return all elements with ``1 < score <= 5`` while:

        .. code::

            ZRANGEBYSCORE zset (5 (10

        Will return all the elements with ``5 < score < 10`` (5 and 10
        excluded).

        .. note::

           **Time complexity**: ``O(log(N)+M)`` with ``N`` being the number of
           elements in the sorted set and ``M`` the number of elements being
           returned. If ``M`` is constant (e.g. always asking for the first
           10 elements with ``count``), you can consider it ``O(log(N))``.

        :param key: The key of the sorted set
        :type key: :class:`str`, :class:`bytes`
        :param min_score: Lowest score definition
        :type min_score: :class:`str`, :class:`bytes`
        :param max_score: Highest score definition
        :type max_score: :class:`str`, :class:`bytes`
        :param bool with_scores: Return elements and scores
        :param offset: The number of elements to skip
        :type min_score: :class:`str`, :class:`bytes`
        :param count: The number of elements to return
        :type min_score: :class:`str`, :class:`bytes`
        :rtype: list
        :raises: :exc:`~tredis.exceptions.RedisError`

def zrangebyscore(self,
                      key,
                      min_score,
                      max_score,
                      with_scores=False,
                      offset=0,
                      count=0):
        """Returns all the elements in the sorted set at key with a score
        between min and max (including elements with score equal to min or
        max). The elements are considered to be ordered from low to high
        scores.

        The elements having the same score are returned in lexicographical
        order (this follows from a property of the sorted set implementation in
        Redis and does not involve further computation).

        The optional ``offset`` and ``count`` arguments can be used to only get
        a range of the matching elements (similar to SELECT LIMIT offset, count
        in SQL). Keep in mind that if offset is large, the sorted set needs to
        be traversed for offset elements before getting to the elements to
        return, which can add up to ``O(N)`` time complexity.

        The optional ``with_scores`` argument makes the command return both the
        element and its score, instead of the element alone. This option is
        available since Redis 2.0.

        **Exclusive intervals and infinity**

        ``min_score`` and ``max_score`` can be ``-inf`` and ``+inf``, so that
        you are not required to know the highest or lowest score in the sorted
        set to get all elements from or up to a certain score.

        By default, the interval specified by ``min_score`` and ``max_score``
        is closed (inclusive). It is possible to specify an open interval
        (exclusive) by prefixing the score with the character ``(``. For
        example:

        .. code::

            ZRANGEBYSCORE zset (1 5

        Will return all elements with ``1 < score <= 5`` while:

        .. code::

            ZRANGEBYSCORE zset (5 (10

        Will return all the elements with ``5 < score < 10`` (5 and 10
        excluded).

        .. note::

           **Time complexity**: ``O(log(N)+M)`` with ``N`` being the number of
           elements in the sorted set and ``M`` the number of elements being
           returned. If ``M`` is constant (e.g. always asking for the first
           10 elements with ``count``), you can consider it ``O(log(N))``.

        :param key: The key of the sorted set
        :type key: :class:`str`, :class:`bytes`
        :param min_score: Lowest score definition
        :type min_score: :class:`str`, :class:`bytes`
        :param max_score: Highest score definition
        :type max_score: :class:`str`, :class:`bytes`
        :param bool with_scores: Return elements and scores
        :param offset: The number of elements to skip
        :type min_score: :class:`str`, :class:`bytes`
        :param count: The number of elements to return
        :type min_score: :class:`str`, :class:`bytes`
        :rtype: list
        :raises: :exc:`~tredis.exceptions.RedisError`
        """
        command = [b'ZRANGEBYSCORE', key, min_score, max_score]
        if with_scores:
            command += ['WITHSCORES']
        if offset or count:
            command += ['LIMIT', offset, count]
        return self._execute(command)