Return the data in the buffer as a bytestring. This is equivalent to calling the bytes constructor on the memoryview.
tobytes(order='C')
>>> m = memoryview(b"abc") >>> m.tobytes() b'abc' >>> bytes(m) b'abc'