]> granicus.if.org Git - python/commitdiff
Revert the change of revision 1.30. While it's in general a laudable
authorGuido van Rossum <guido@python.org>
Mon, 22 Jun 1998 14:07:36 +0000 (14:07 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 22 Jun 1998 14:07:36 +0000 (14:07 +0000)
goal to use isinstance(x, y) instead of comparing type(x) to y, it
doesn't make sense to change this in the example code for the type()
builtin...

Doc/lib/libfuncs.tex

index 3937c29067c1149fbfa4a5d668e4ea9c825b4095..f00d81d7749190ef6e96b0c9ffc4e61d608b2353 100644 (file)
@@ -602,7 +602,7 @@ For instance:
 
 \begin{verbatim}
 >>> import types
->>> if isinstance(x, types.StringType): print "It's a string"
+>>> if type(x) == types.StringType: print "It's a string"
 \end{verbatim}
 \end{funcdesc}