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 <rep...@bugs.python.org> <http://bugs.python.org/issue19251> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com