[New-bugs-announce] [issue19251] bitwise ops for bytes of equal length
Christian Heimes
report at bugs.python.org
Sun Oct 13 22:07:27 CEST 2013
New submission from Christian Heimes:
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'
----------
components: Interpreter Core
messages: 199785
nosy: christian.heimes
priority: normal
severity: normal
stage: needs patch
status: open
title: bitwise ops for bytes of equal length
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19251>
_______________________________________
More information about the New-bugs-announce
mailing list