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
2f401d71
Commit
2f401d71
authored
Mar 23, 2007
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1686451: Fix return type for PySequence_{Count,Index,Fast_GET_SIZE}.
Will backport.
parent
eff49dce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
Doc/api/abstract.tex
Doc/api/abstract.tex
+3
-3
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/api/abstract.tex
View file @
2f401d71
...
...
@@ -810,7 +810,7 @@ determination.
the Python statement
\samp
{
del
\var
{
o
}
[
\var
{
i1
}
:
\var
{
i2
}
]
}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
in
t
}{
PySequence
_
Count
}{
PyObject *o, PyObject *value
}
\begin{cfuncdesc}
{
Py
_
ssize
_
t
}{
PySequence
_
Count
}{
PyObject *o, PyObject *value
}
Return the number of occurrences of
\var
{
value
}
in
\var
{
o
}
, that is,
return the number of keys for which
\code
{
\var
{
o
}
[
\var
{
key
}
] ==
\var
{
value
}}
. On failure, return
\code
{
-1
}
. This is equivalent to
...
...
@@ -824,7 +824,7 @@ determination.
expression
\samp
{
\var
{
value
}
in
\var
{
o
}}
.
\end{cfuncdesc}
\begin{cfuncdesc}
{
in
t
}{
PySequence
_
Index
}{
PyObject *o, PyObject *value
}
\begin{cfuncdesc}
{
Py
_
ssize
_
t
}{
PySequence
_
Index
}{
PyObject *o, PyObject *value
}
Return the first index
\var
{
i
}
for which
\code
{
\var
{
o
}
[
\var
{
i
}
] ==
\var
{
value
}}
. On error, return
\code
{
-1
}
. This is equivalent to
the Python expression
\samp
{
\var
{
o
}
.index(
\var
{
value
}
)
}
.
...
...
@@ -874,7 +874,7 @@ determination.
\versionadded
{
2.3
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
in
t
}{
PySequence
_
Fast
_
GET
_
SIZE
}{
PyObject *o
}
\begin{cfuncdesc}
{
Py
_
ssize
_
t
}{
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
not
\NULL
. The size can also be gotten by calling
...
...
Misc/NEWS
View file @
2f401d71
...
...
@@ -711,6 +711,9 @@ Tools
Documentation
-------------
- Patch #1686451: Fix return type for
PySequence_{Count,Index,Fast_GET_SIZE}.
- Patch #1679379: add documentation for fnmatch.translate().
- Bug #1629566: clarify the docs on the return values of parsedate()
...
...
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