Python 2 and 3 are inconsistent with how they treat memoryview, but they are consistent on bytearray treatment Since rqv is merely a cheaply sliceable view of rq, use rq directly for functions where the difference between 2 and 3 would matter.