Message199785
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' |
|
Date |
User |
Action |
Args |
2013-10-13 20:07:27 | christian.heimes | set | recipients:
+ christian.heimes |
2013-10-13 20:07:27 | christian.heimes | set | messageid: <1381694847.24.0.709324715816.issue19251@psf.upfronthosting.co.za> |
2013-10-13 20:07:27 | christian.heimes | link | issue19251 messages |
2013-10-13 20:07:27 | christian.heimes | create | |
|