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
ba847435
Commit
ba847435
authored
Apr 23, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify the return value of PyObject_IsInstance().
parent
0c92c811
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Doc/api/abstract.tex
Doc/api/abstract.tex
+9
-8
No files found.
Doc/api/abstract.tex
View file @
ba847435
...
@@ -129,14 +129,15 @@ for which they do not apply, they will raise a Python exception.
...
@@ -129,14 +129,15 @@ for which they do not apply, they will raise a Python exception.
\end{cfuncdesc}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyObject
_
IsInstance
}{
PyObject *inst, PyObject *cls
}
\begin{cfuncdesc}
{
int
}{
PyObject
_
IsInstance
}{
PyObject *inst, PyObject *cls
}
Return
\code
{
1
}
if
\var
{
inst
}
is an instance of the class
\var
{
cls
}
Returns
\code
{
1
}
if
\var
{
inst
}
is an instance of the class
\var
{
cls
}
or a subclass of
\var
{
cls
}
. If
\var
{
cls
}
is a type object rather
or a subclass of
\var
{
cls
}
, or
\code
{
0
}
if not. On error, returns
than a class object,
\cfunction
{
PyObject
_
IsInstance()
}
returns
\code
{
-1
}
and sets an exception. If
\var
{
cls
}
is a type object
\code
{
1
}
if
\var
{
inst
}
is of type
\var
{
cls
}
. If
\var
{
inst
}
is not a
rather than a class object,
\cfunction
{
PyObject
_
IsInstance()
}
class instance and
\var
{
cls
}
is neither a type object or class
returns
\code
{
1
}
if
\var
{
inst
}
is of type
\var
{
cls
}
. If
\var
{
inst
}
object,
\var
{
inst
}
must have a
\member
{__
class
__}
attribute --- the
is not a class instance and
\var
{
cls
}
is neither a type object or
class relationship of the value of that attribute with
\var
{
cls
}
class object,
\var
{
inst
}
must have a
\member
{__
class
__}
attribute
will be used to determine the result of this function.
--- the class relationship of the value of that attribute with
\var
{
cls
}
will be used to determine the result of this function.
\versionadded
{
2.1
}
\versionadded
{
2.1
}
\end{cfuncdesc}
\end{cfuncdesc}
...
...
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