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
3593e5c4
Commit
3593e5c4
authored
Dec 02, 1997
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document new behavior of isinstance() when using a type object.
parent
f5dd9141
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
Doc/lib/libfuncs.tex
Doc/lib/libfuncs.tex
+5
-3
Doc/libfuncs.tex
Doc/libfuncs.tex
+5
-3
No files found.
Doc/lib/libfuncs.tex
View file @
3593e5c4
...
@@ -308,9 +308,11 @@ module from which it is called).
...
@@ -308,9 +308,11 @@ module from which it is called).
\begin{funcdesc}
{
isinstance
}{
object, class
}
\begin{funcdesc}
{
isinstance
}{
object, class
}
Return true if the
\var
{
object
}
argument is an instance of the
Return true if the
\var
{
object
}
argument is an instance of the
\var
{
class
}
argument, or of a (direct or indirect) subclass thereof.
\var
{
class
}
argument, or of a (direct or indirect) subclass thereof.
If
\var
{
object
}
is not a class instance, the function always returns
Also return true if
\var
{
class
}
is a type object and
\var
{
object
}
is
false. If
\var
{
class
}
is not a class object, a
\code
{
TypeError
}
an object of that type. If
\var
{
object
}
is not a class instance or a
exception is raised.
object of the given type, the function always returns false. If
\var
{
class
}
is neither a class object nor a type object, a
\code
{
TypeError
}
exception is raised.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
issubclass
}{
class1, class2
}
\begin{funcdesc}
{
issubclass
}{
class1, class2
}
...
...
Doc/libfuncs.tex
View file @
3593e5c4
...
@@ -308,9 +308,11 @@ module from which it is called).
...
@@ -308,9 +308,11 @@ module from which it is called).
\begin{funcdesc}
{
isinstance
}{
object, class
}
\begin{funcdesc}
{
isinstance
}{
object, class
}
Return true if the
\var
{
object
}
argument is an instance of the
Return true if the
\var
{
object
}
argument is an instance of the
\var
{
class
}
argument, or of a (direct or indirect) subclass thereof.
\var
{
class
}
argument, or of a (direct or indirect) subclass thereof.
If
\var
{
object
}
is not a class instance, the function always returns
Also return true if
\var
{
class
}
is a type object and
\var
{
object
}
is
false. If
\var
{
class
}
is not a class object, a
\code
{
TypeError
}
an object of that type. If
\var
{
object
}
is not a class instance or a
exception is raised.
object of the given type, the function always returns false. If
\var
{
class
}
is neither a class object nor a type object, a
\code
{
TypeError
}
exception is raised.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
issubclass
}{
class1, class2
}
\begin{funcdesc}
{
issubclass
}{
class1, class2
}
...
...
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