4 ms·
See http://bugs.python.org/issue10211 http://bugs.python.org/issue10211 Basically, Python has the "buffer" object which is a 0-copy view of some memory area (l
by masklinn 14y ago
See http://bugs.python.org/issue10211 http://bugs.python.org/issue10211
Basically, Python has the "buffer" object which is a 0-copy view of some memory area (lets an object expose itself as a bytes array of sorts). It's always been plagued with a number of issues.
In Python 3, `buffer` was removed and replaced with `memoryview`, which was backported to Python 2.7. But in said Python 2.7, `buffer` and `memoryview` both exist and fill very similar need so e.g. older libraries will likely return a buffer which newer code will want to use as a memoryview. No such luck, they're not compatible.
2.7.4 fixes that so you can get a memoryview from a buffer.