Kaydet (Commit) a7874d15 authored tarafından Guido van Rossum's avatar Guido van Rossum

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...
üst e6762977
...@@ -602,7 +602,7 @@ For instance: ...@@ -602,7 +602,7 @@ For instance:
\begin{verbatim} \begin{verbatim}
>>> import types >>> 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{verbatim}
\end{funcdesc} \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