On Fri, 18 May 2018 13:49:58 -0300, Facundo Batista wrote:
Once you think as the whole sequence of bytes as a sequence of bits (eight times longer, of course), all questions are easly answered, see below...

I had never considered this before, but it seems very interesting. Essentially that would make bytes1 ^ bytes2 be equivalent to

    (int.from_bytes(bytes1, sys.byteorder) ^ int.from_bytes(bytes2, sys.byteorder)).to_bytes(max(len(bytes1), len(bytes2)), sys.byteorder)


rather than

    bytes(a ^ b for a, b in zip(bytes1, bytes2))

I like that idea more than my original elementwise idea.

​Thinking,
Ken Hilton;​