Correct use of buffers vs. strings for Python 3