Message 145797 - Python tracker (original) (raw)

I made the decision to raise a ValueError decision because contains of both bytes and bytearray raise a ValueError when passed an integer not in range(0, 256).

That sounds reasonable. OverflowError would have been another choice, but I agree that consistency with contains is sensible.