mirror of https://github.com/python/cpython
Add cautionary note on the use of PySequence_Fast_ITEMS.
This commit is contained in:
parent
feef51d988
commit
8dbbb96929
|
@ -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.
|
||||
|
||||
.. versionadded:: 2.4
|
||||
|
||||
|
|
Loading…
Reference in New Issue