mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
As discussed on python-dev, revised docs to note that
PyObject_IsTrue() can have an error result. Also, added missing docs for PyObject_Not(). Will backport.
This commit is contained in:
parent
1475c49211
commit
2ed6dff796
1 changed files with 8 additions and 1 deletions
|
@ -310,7 +310,14 @@ determination.
|
|||
\begin{cfuncdesc}{int}{PyObject_IsTrue}{PyObject *o}
|
||||
Returns \code{1} if the object \var{o} is considered to be true, and
|
||||
\code{0} otherwise. This is equivalent to the Python expression
|
||||
\samp{not not \var{o}}. This function always succeeds.
|
||||
\samp{not not \var{o}}. On failure, return \code{-1}.
|
||||
\end{cfuncdesc}
|
||||
|
||||
|
||||
\begin{cfuncdesc}{int}{PyObject_Not}{PyObject *o}
|
||||
Returns \code{0} if the object \var{o} is considered to be true, and
|
||||
\code{1} otherwise. This is equivalent to the Python expression
|
||||
\samp{not \var{o}}. On failure, return \code{-1}.
|
||||
\end{cfuncdesc}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue