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...
This commit is contained in:
parent
e67629774f
commit
a7874d1505
|
@ -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}
|
||||
|
||||
|
|
Loading…
Reference in New Issue