[Python-ideas] Bitwise operations on bytes class
Nathaniel McCallum
npmccallum at redhat.com
Wed Jun 18 07:03:02 CEST 2014
On Wed, 2014-06-18 at 12:34 +1000, Nick Coghlan wrote:
>
> On 18 Jun 2014 09:31, "MRAB" <python at mrabarnett.plus.com> wrote:
> >
> > On 2014-06-17 23:10, Nick Coghlan wrote:
> > >
> > > Wanting an arithmetic shift would be a sign that one is working
> with integers rather than arbitrary binary data, and ints or one of
> the fixed width types from NumPy would likely be a better fit. So
> leaving that out of any proposal sounds fine to me.
> > >
> > What about rotates?
>
> Bitwise rotation would be a bit of a pain to build on top of bitwise
> masking and logical shifts, but it could be done, so I think it would
> make more sense to keep a proposal minimal.
Agreed. The code that I attached to one of my early replies actually
implemented rotate, but I don't think that is what should be implemented
by default in this proposal.
Nathaniel
More information about the Python-ideas
mailing list