]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Users of PySequence_GET_FAST() should get the length of the sequence using
authorFred Drake <fdrake@acm.org>
Tue, 29 May 2001 18:51:41 +0000 (18:51 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 29 May 2001 18:51:41 +0000 (18:51 +0000)
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.

Doc/api/api.tex

index 57c1008b60ca203b7c87b739d53e09c896e31972..613f62cb7365e9879bddc3d5dedafdbc1db0b7d2 100644 (file)
@@ -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}