I think I understand python bytes objects, but supporting bitwise operations on byte strings seems like such an obvious feature. I don't understand why it is not supported.
>>>'abcdefg'.encode('ascii')
b'abcdefg'
Okay. I went from a string to something like the byte representation of my string in ascii.
So when I try:
>>> a = 'abcdefg'.encode('ascii')
>>> a ^ a
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for ^: 'bytes' and 'bytes'
Why? Why doesn't python support this? Is there something I don't understand about bytes objects that makes this unfeasible or ambiguous?