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 minmax[1] > v[1]: __has.add((v[1], minmax[1]))
            # we get two, one or zero "new" subranges. __optimize is not necessary.

        return range_t(__has)
def __sub__ ( self , val ) : if not isinstance ( val , range_t ) : val = { self . __val_convert ( val ) } else : val = val . toset ( ) __has = deepcopy ( self . __has ) for v in val : common = self . __match_l ( v , __has ) if not common : continue __has . difference_update ( common ) 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 minmax [ 1 ] > v [ 1 ] : __has . add ( ( v [ 1 ] , minmax [ 1 ] ) ) return range_t ( __has )
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`.