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 <rep...@bugs.python.org> <http://bugs.python.org/issue3489> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com