diff options
author | Guido van Rossum <guido@python.org> | 1997-12-02 19:15:01 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-02 19:15:01 (GMT) |
commit | 3593e5c4c356fcf4a5c2438519dd9a6cf54a4bcb (patch) | |
tree | bcf85c9a85b0d200b6b5de23b014713dfc2fc887 /Doc/libfuncs.tex | |
parent | f5dd914196dc4c55394832b3de62fb621b4482e2 (diff) | |
download | cpython-3593e5c4c356fcf4a5c2438519dd9a6cf54a4bcb.zip cpython-3593e5c4c356fcf4a5c2438519dd9a6cf54a4bcb.tar.gz cpython-3593e5c4c356fcf4a5c2438519dd9a6cf54a4bcb.tar.bz2 |
Document new behavior of isinstance() when using a type object.
Diffstat (limited to 'Doc/libfuncs.tex')
-rw-r--r-- | Doc/libfuncs.tex | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/libfuncs.tex b/Doc/libfuncs.tex index 0211cec..0182dcb 100644 --- a/Doc/libfuncs.tex +++ b/Doc/libfuncs.tex @@ -308,9 +308,11 @@ module from which it is called). \begin{funcdesc}{isinstance}{object, class} Return true if the \var{object} argument is an instance of the \var{class} argument, or of a (direct or indirect) subclass thereof. -If \var{object} is not a class instance, the function always returns -false. If \var{class} is not a class object, a \code{TypeError} -exception is raised. +Also return true if \var{class} is a type object and \var{object} is +an object of that type. If \var{object} is not a class instance or a +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} \begin{funcdesc}{issubclass}{class1, class2} |