def contains(self, val):

        """
        Check if given value or range is present.

        Parameters
        ----------
        val : int or tuple or list or range
            Range or integer being checked.

        Returns
        -------
        retlen : int
            Length of overlapping with `val` subranges.
        """

        (start, end) = self.__val_convert(val) # conversion

        retlen = 0
        for r in self.__has:
            if start < r[1] and end > r[0]:
                retlen += ((r[1] < end and end) or r[1]) - ((start > r[0] and start) or r[0])

        return retlen
dataset/ETHPy150Open rasguanabana/ytfs/ytfs/range_t.py/range_t.contains/swapped operands of `<`