Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libfuncs.tex @ 6707:39d96d9d3ccb legacy-trunk
Document new behavior of isinstance() when using a type object.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 02 Dec 1997 19:15:01 +0000 |
| parents | 14d58b5a21c4 |
| children | 1902938e42c6 |
line wrap: on
line diff
--- a/Doc/lib/libfuncs.tex Tue Dec 02 19:11:45 1997 +0000 +++ b/Doc/lib/libfuncs.tex Tue Dec 02 19:15:01 1997 +0000 @@ -308,9 +308,11 @@ \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}
