def __sub__(self, other): if other is None: other = NIL_BITMAP return bitmap(BitMap.__sub__(self, other))
def __sub__(self, other: Optional[bitmap]) -> bitmap: if other is None: other = NIL_BITMAP if isinstance(other, bitmap): return bitmap(BitMap.__sub__(self.bm, other.bm)) raise TypeError("Invalid type {type(other)}")