diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-29 18:53:11 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-29 18:53:11 (GMT) |
commit | ecf1b65e90d5949d56e5394cf4d3b7a999ac29ca (patch) | |
tree | 1e88ab0a3695c63c76d396064bd7ee33aba0f5d7 | |
parent | f1760de4b3806d35289a93b2151a95c9ee488316 (diff) | |
download | cpython-ecf1b65e90d5949d56e5394cf4d3b7a999ac29ca.zip cpython-ecf1b65e90d5949d56e5394cf4d3b7a999ac29ca.tar.gz cpython-ecf1b65e90d5949d56e5394cf4d3b7a999ac29ca.tar.bz2 |
Users of PySequence_GET_FAST() should get the length of the sequence using
PySequence_Size(), not PyObject_Size(): the later considers the mapping
methods as well as the sequence methods, which is not needed here. Either
should be equally fast in this case, but PySequence_Size() offers a better
conceptual match.
-rw-r--r-- | Doc/api/api.tex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex index eeb6783..e2c0070 100644 --- a/Doc/api/api.tex +++ b/Doc/api/api.tex @@ -2016,7 +2016,7 @@ raises \exception{TypeError} with \var{m} as the message text. Return the \var{i}th element of \var{o}, assuming that \var{o} was returned by \cfunction{PySequence_Fast()}, and that \var{i} is within bounds. The caller is expected to get the length of the sequence by -calling \cfunction{PyObject_Size()} on \var{o}, since lists and tuples +calling \cfunction{PySequence_Size()} on \var{o}, since lists and tuples are guaranteed to always return their true length. \end{cfuncdesc} |