@@ -244,7 +244,6 @@ The following fields are not influenced by *flags* and must always be filled in
244244with the correct values: :c:member: `~Py_buffer.obj `, :c:member: `~Py_buffer.buf `,
245245:c:member: `~Py_buffer.len `, :c:member: `~Py_buffer.itemsize `, :c:member: `~Py_buffer.ndim `.
246246
247-
248247readonly, format
249248~~~~~~~~~~~~~~~~
250249
@@ -253,7 +252,8 @@ readonly, format
253252 Controls the :c:member: `~Py_buffer.readonly ` field. If set, the exporter
254253 MUST provide a writable buffer or else report failure. Otherwise, the
255254 exporter MAY provide either a read-only or writable buffer, but the choice
256- MUST be consistent for all consumers.
255+ MUST be consistent for all consumers. For example, :c:expr: `PyBUF_SIMPLE | PyBUF_WRITABLE `
256+ can be used to request a simple writable buffer.
257257
258258 .. c :macro :: PyBUF_FORMAT
259259
@@ -265,8 +265,9 @@ readonly, format
265265Since :c:macro: `PyBUF_SIMPLE ` is defined as 0, :c:macro: `PyBUF_WRITABLE `
266266can be used as a stand-alone flag to request a simple writable buffer.
267267
268- :c:macro: `PyBUF_FORMAT ` can be \| 'd to any of the flags except :c:macro: `PyBUF_SIMPLE `.
269- The latter already implies format ``B `` (unsigned bytes).
268+ :c:macro: `PyBUF_FORMAT ` must be \| 'd to any of the flags except :c:macro: `PyBUF_SIMPLE `, because
269+ the latter already implies format ``B `` (unsigned bytes). :c:macro: `!PyBUF_FORMAT ` cannot be
270+ used on its own.
270271
271272
272273shape, strides, suboffsets
0 commit comments