def __sub__(self, val):

        """
        Substracting support.
        
        Parameters
        ----------
        val : int or tuple or list or range
            Integer or range to substract.

        Returns
        -------
        range_t
            New ``range_t`` object bereft of `val`.
        """

        if not isinstance(val, range_t):
            #sanitize it!
            val = {self.__val_convert(val)}
        else:
            val = val.toset()

        __has = deepcopy(self.__has)

        for v in val:
            common = self.__match_l(v, __has) # search for colliding subranges.
            if not common: continue # no collisions - nothing to substract.

            __has.difference_update(common) # we delete collisions, beacause we need to cut them.

            minmax = (min({l[0] for l in common}), max({r[1] for r in common}))

            if minmax[0] < v[0]: __has.add((minmax[0], v[0]))
            if v[1] > minmax[1]: __has.add((v[1], minmax[1]))
            # we get two, one or zero "new" subranges. __optimize is not necessary.

        return range_t(__has)
dataset/ETHPy150Open rasguanabana/ytfs/ytfs/range_t.py/range_t.__sub__/swapped operands of `>`