diff options
Diffstat (limited to 'Doc/c-api/sequence.rst')
-rw-r--r-- | Doc/c-api/sequence.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/c-api/sequence.rst b/Doc/c-api/sequence.rst index 6d3ef71083..0ebc0f3f00 100644 --- a/Doc/c-api/sequence.rst +++ b/Doc/c-api/sequence.rst @@ -143,6 +143,10 @@ Sequence Protocol Return the underlying array of PyObject pointers. Assumes that *o* was returned by :cfunc:`PySequence_Fast` and *o* is not *NULL*. + + Note, if a list gets resized, the reallocation may relocate the items array. + So, only use the underlying array pointer in contexts where the sequence + cannot change. .. cfunction:: PyObject* PySequence_ITEM(PyObject *o, Py_ssize_t i) |