commit | fd49a964bcb473ef20acb70d278766012bf3b577 | [log] [tgz] |
---|---|---|
author | Fred Drake <fdrake@acm.org> | Sun Jan 11 21:15:23 1998 +0000 |
committer | Fred Drake <fdrake@acm.org> | Sun Jan 11 21:15:23 1998 +0000 |
tree | 6f31e5b61f79df3bef1a82ba03ae23dd22b95aa3 | |
parent | 48022db400aff1172bd07533774224a61b2bfd7d [diff] [blame] |
Follow current recommended practice in an example: Use isinstance() to perform a type test instead of type(x) == types.FoobarType. In example for type().
diff --git a/Doc/libfuncs.tex b/Doc/libfuncs.tex index 51edb33..36582da 100644 --- a/Doc/libfuncs.tex +++ b/Doc/libfuncs.tex
@@ -606,7 +606,7 @@ \bcode\begin{verbatim} >>> import types ->>> if type(x) == types.StringType: print "It's a string" +>>> if isinstance(x, types.StringType): print "It's a string" \end{verbatim}\ecode \end{funcdesc}