[Python-Dev] bitwise operations for bytes and bytearray (original) (raw)

Martin Panter vadmium+py at gmail.com
Sat Jan 9 22:21:37 EST 2016


On 10 January 2016 at 00:17, Blake Griffith <blake.a.griffith at gmail.com> wrote:

A little update, I got ^, &, and | working for bytearrays. You can view the diff here: https://github.com/python/cpython/compare/master...cowlicks:bitwise-bytes?expand=1

How does it look?

I left some comments against your commits on Git Hub. Unfortunately they seem to be made in the base Python repository, rather than your fork, which I did not expect.

Joe, is this how I should allocate the arrays? Am I freeing them properly? Am I checking the input enough?

After some feedback, I'll probably add bitshifting and negation. Then work on bytes objects. Does this warrant a pep?



More information about the Python-Dev mailing list