summaryrefslogtreecommitdiffstats
path: root/Doc/libfuncs.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-01-11 21:15:23 (GMT)
committerFred Drake <fdrake@acm.org>1998-01-11 21:15:23 (GMT)
commitfd49a964bcb473ef20acb70d278766012bf3b577 (patch)
tree6f31e5b61f79df3bef1a82ba03ae23dd22b95aa3 /Doc/libfuncs.tex
parent48022db400aff1172bd07533774224a61b2bfd7d (diff)
downloadcpython-fd49a964bcb473ef20acb70d278766012bf3b577.zip
cpython-fd49a964bcb473ef20acb70d278766012bf3b577.tar.gz
cpython-fd49a964bcb473ef20acb70d278766012bf3b577.tar.bz2
Follow current recommended practice in an example: Use isinstance() to
perform a type test instead of type(x) == types.FoobarType. In example for type().
Diffstat (limited to 'Doc/libfuncs.tex')
-rw-r--r--Doc/libfuncs.tex2
1 files changed, 1 insertions, 1 deletions
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 @@ For instance:
\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}