mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
SF bug #918371: hasattr()'s return type
Replace 1 and 0 with True and False.
This commit is contained in:
parent
0813d76cb0
commit
fe703e0650
1 changed files with 2 additions and 2 deletions
|
@ -469,8 +469,8 @@ class C:
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{hasattr}{object, name}
|
\begin{funcdesc}{hasattr}{object, name}
|
||||||
The arguments are an object and a string. The result is 1 if the
|
The arguments are an object and a string. The result is \code{True} if the
|
||||||
string is the name of one of the object's attributes, 0 if not.
|
string is the name of one of the object's attributes, \code{False} if not.
|
||||||
(This is implemented by calling \code{getattr(\var{object},
|
(This is implemented by calling \code{getattr(\var{object},
|
||||||
\var{name})} and seeing whether it raises an exception or not.)
|
\var{name})} and seeing whether it raises an exception or not.)
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue