Possibility to exclude ranges from range

I I think the use case is too specific. Someone may want to have more than one range of numbers with more than one range of exemption ranges. What about negative steps? steps other than +/- 1? What about iterating of the resultant in reverse? or the resultant with its own start, stop and step? What about __contains__?
(There’s probably a way to do all that by calculations on sub-range arguments and use of next on range iterators/reversed iterators - i.e. wityhout creating a set of all possible integers then iterating through that, in order, but I haven’t done it).

2 Likes