[issue3489] add rotate{left,right} methods to bytearray

Serhiy Storchaka report at bugs.python.org
Sat May 18 11:34:07 CEST 2013


Serhiy Storchaka added the comment:

I think you rather need the inplace shift operation. Or even the move the tail of buffer to the start without filling the remaining. I.e. something like

    buffer[:size] = buffer[-size:]

but without creating immediate bytes object. Now it may be written as:

    buffer[:size] = memoryview(buffer)[-size:]

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3489>
_______________________________________


More information about the Python-bugs-list mailing list