This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2013-10-13.20:07:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za>
In-reply-to
Content
I like to propose a new feature for bytes and perhaps bytearray. None of the bytes types support bitwise operations like &, | and ^. I like to add the bitwise protocol between byte objects of equal length:

>>> a, b = b"123", b"abc"
>>> bytes(x ^ y for x, y in zip(a, b)) 
b'PPP'
>>> a ^ b
b'PPP'
History
Date User Action Args
2013-10-13 20:07:27christian.heimessetrecipients: + christian.heimes
2013-10-13 20:07:27christian.heimessetmessageid: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za>
2013-10-13 20:07:27christian.heimeslinkissue19251 messages
2013-10-13 20:07:27christian.heimescreate