Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7874d1

Browse files
committed
Revert the change of revision 1.30. While it's in general a laudable
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...
1 parent e676297 commit a7874d1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/lib/libfuncs.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ \section{Built-in Functions}
602602

603603
\begin{verbatim}
604604
>>> import types
605-
>>> if isinstance(x, types.StringType): print "It's a string"
605+
>>> if type(x) == types.StringType: print "It's a string"
606606
\end{verbatim}
607607
\end{funcdesc}
608608

0 commit comments

Comments
 (0)