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