Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
81cccb75
Commit
81cccb75
authored
Sep 12, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added documentation for PySequence_Fast() and PySequence_Fast_GET_ITEM().
parent
aafc0c45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
Doc/api/api.tex
Doc/api/api.tex
+17
-0
Doc/api/refcounts.dat
Doc/api/refcounts.dat
+8
-0
No files found.
Doc/api/api.tex
View file @
81cccb75
...
...
@@ -1780,6 +1780,23 @@ otherwise a tuple will be constructed with the appropriate contents.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PySequence
_
Fast
}{
PyObject *o, const char *m
}
Returns the sequence
\var
{
o
}
as a tuple, unless it is already a
tuple or list, in which case
\var
{
o
}
is returned. Use
\cfunction
{
PySequence
_
Fast
_
GET
_
ITEM()
}
to access the members of the
result. Returns
\NULL
{}
on failure. If the object is not a sequence,
raises
\exception
{
TypeError
}
with
\var
{
m
}
as the message text.
\end{cfuncdesc}
\begin{cfuncdesc}
{
PyObject*
}{
PySequence
_
Fast
_
GET
_
ITEM
}{
PyObject *o, int i
}
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
are guaranteed to always return their true length.
\end{cfuncdesc}
\section
{
Mapping Protocol
\label
{
mapping
}}
\begin{cfuncdesc}
{
int
}{
PyMapping
_
Check
}{
PyObject *o
}
...
...
Doc/api/refcounts.dat
View file @
81cccb75
...
...
@@ -702,6 +702,14 @@ PySequence_DelSlice:PyObject*:o:0:
PySequence_DelSlice:int:i1::
PySequence_DelSlice:int:i2::
PySequence_Fast:PyObject*::+1:
PySequence_Fast:PyObject*:v:0:
PySequence_Fast:const char*:m::
PySequence_Fast_GET_ITEM:PyObject*::0:
PySequence_Fast_GET_ITEM:PyObject*:o:0:
PySequence_Fast_GET_ITEM:int:i::
PySequence_GetItem:PyObject*::+1:
PySequence_GetItem:PyObject*:o:0:
PySequence_GetItem:int:i::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment