Shorthand name for the Python buffer interface, so named for the `Py_buffer` struct used throughout.
The Python buffer interface comprises both the “Revised Buffer Protocol” – also known as pep3118 – and the legacy buffer API.
The legacy API exposes a top-level builtin buffer
type to Python programmers; a set of corresponding PyBuffer_*
C functions are furnished to cpython extension developers.
The revised protocol introduced the Py_buffer
struct, with a new general low-level C-API that isn’t restricted to a specific Python type, to the extension interface. The high-level features of the old buffer
objects are made available by the new memoryview
Python type.
Depending on the context, “PyBuffer” can refer literally to the revised protocol’s Py_buffer
struct, or (more often than not) the general notion of using buffers in Python.