| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,6 +59,12 @@ Tuple Objects | |||
| 59 | 59 | Return the object at position *pos* in the tuple pointed to by *p*. If *pos* is | |
| 60 | 60 | negative or out of bounds, return ``NULL`` and set an :exc:`IndexError` exception. | |
| 61 | 61 | ||
| 62 | + The returned reference is borrowed from the tuple *p* | ||
| 63 | + (that is: it is only valid as long as you hold a reference to *p*). | ||
| 64 | + To get a :term:`strong reference`, use | ||
| 65 | + :c:func:`Py_NewRef(PyTuple_GetItem(...)) <Py_NewRef>` | ||
| 66 | + or :c:func:`PySequence_GetItem`. | ||
| 67 | + | ||
| 62 | 68 | ||
| 63 | 69 | .. c:function:: PyObject* PyTuple_GET_ITEM(PyObject *p, Py_ssize_t pos) | |
| 64 | 70 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments