mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue