Commit fd49a964 authored by Fred Drake's avatar Fred Drake

Follow current recommended practice in an example: Use isinstance() to

perform a type test instead of type(x) == types.FoobarType.  In example
for type().
parent 48022db4
......@@ -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}
......
......@@ -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}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment