[Python-ideas] Bitwise operations on bytes class

Nathaniel McCallum npmccallum at redhat.com
Mon Jun 16 20:03:30 CEST 2014


I find myself, fairly often, needing to perform bitwise operations
(rshift, lshift, and, or, xor) on arrays of bytes in python (both bytes
and bytearray). I can't think of any other reasonable use for these
operators. Is upstream Python interested in this kind of behavior by
default? At the least, it would make many algorithms very easy to read
and write.

Nathaniel



More information about the Python-ideas mailing list