diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-05-08 08:44:21 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-05-08 08:44:21 (GMT) |
commit | 01f94bda38b8f9956cfa1b227f2ebdb8ea2dfdd7 (patch) | |
tree | 07d60d276dc54212ddf73496f865f00c6821417c /Doc | |
parent | 000e37c3c433f42bafc68eee78633da147734808 (diff) | |
download | cpython-01f94bda38b8f9956cfa1b227f2ebdb8ea2dfdd7.zip cpython-01f94bda38b8f9956cfa1b227f2ebdb8ea2dfdd7.tar.gz cpython-01f94bda38b8f9956cfa1b227f2ebdb8ea2dfdd7.tar.bz2 |
Patch #552433: Special-case tuples. Avoid sub-type checking for lists.
Avoid checks for negative indices and duplicate checks for support of
the sequence protocol.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/abstract.tex | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex index 0e25afa..e4f299d 100644 --- a/Doc/api/abstract.tex +++ b/Doc/api/abstract.tex @@ -765,6 +765,13 @@ determination. and that \var{i} is within bounds. \end{cfuncdesc} +\begin{cfuncdesc}{PyObject*}{PySequence_ITEM}{PyObject *o, int i} + Return the \var{i}th element of \var{o} or \NULL on failure. + Macro form of \cfunction{PySequence_GetItem()} but without checking + that \cfunction{PySequence_Check(\var{o})} is true and without + adjustment for negative indices. +\end{cfuncdesc} + \begin{cfuncdesc}{int}{PySequence_Fast_GET_SIZE}{PyObject *o} Returns the length of \var{o}, assuming that \var{o} was returned by \cfunction{PySequence_Fast()} and that \var{o} is |