<div dir="ltr">Thanks for the quick responses y'all. I have something compiling on my branch, which is enough for me tonight.<br><br>I asked a question about this on stackoverflow a while ago, it wasn't very popular <div><a href="https://stackoverflow.com/questions/32658420/why-cant-you-xor-bytes-objects-in-python">https://stackoverflow.com/questions/32658420/why-cant-you-xor-bytes-objects-in-python</a><br><br>Someone there pointed out this feature was suggested on the mailing list a while back (2006) </div><div><a href="https://mail.python.org/pipermail/python-dev/2006-March/061980.html">https://mail.python.org/pipermail/python-dev/2006-March/061980.html</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 1:12 AM, Andrew Barnert <span dir="ltr"><<a href="mailto:abarnert@yahoo.com" target="_blank">abarnert@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Jan 7, 2016, at 15:57, Martin Panter <<a href="mailto:vadmium%2Bpy@gmail.com">vadmium+py@gmail.com</a>> wrote:<br>
><br>
>> On 7 January 2016 at 22:26, Blake Griffith <<a href="mailto:blake.a.griffith@gmail.com">blake.a.griffith@gmail.com</a>> wrote:<br>
>> I'm interested in adding the functionality to do something like:<br>
>><br>
>>>>> b'a' ^ b'b'<br>
>> b'\x03'<br>
>><br>
>><br>
>> Instead of the good ol' TypeError.<br>
>><br>
>> I think both bytes and bytearray should support all the bitwise operations.<br>
><br>
> There is a bug open about adding this kind of functionality:<br>
> <<a href="https://bugs.python.org/issue19251" rel="noreferrer" target="_blank">https://bugs.python.org/issue19251</a>>.<br>
<br>
</div></div>And it's in the needs patch stage, which makes it perfect for the OP: in addition to learning how to hack on builtin types, he can also learn the other parts of the dev process. (Even if the bug is eventually rejected, as seems likely given that it sat around for three years with no compelling use case  and then Guido added a "very skeptical" comment.)</blockquote></div><br></div>