[Python-ideas] Bitwise operations on bytes class

Ethan Furman ethan at stoneleaf.us
Mon Jun 16 21:03:08 CEST 2014


On 06/16/2014 11:03 AM, Nathaniel McCallum wrote:
>
> 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.

Could you give a couple examples?

--
~Ethan~


More information about the Python-ideas mailing list