IMHO, the whole buffer interface is weird. - Only the Buffer_FromObject() function is exposed to the python level (as buffer()), the other functions are missing. This means that one could only use the buffer interface in extension modules. Was this intentional? - No way a python class can expose the buffer interface - There is a bug in the buffer interface (which prevented recently that I could use buffer objects at all, I had to implement my own) PyObject *base = PyBuffer_New(100); PyObject *buffer = PyBuffer_FromObject(base, 0, 100); Py_DECREF(base); After this code is executed, buffer points to deallocated memory (because buffer does not hold a reference to base anymore). (Guido classified this as a wish, but at least it contradicts the documentation) Thomas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4