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

Try to discourage use of PyObject_Type().

üst fc29646a
......@@ -319,6 +319,11 @@ determination.
the object type of object \var{o}. On failure, raises
\exception{SystemError} and returns \NULL. This is equivalent to
the Python expression \code{type(\var{o})}.
This function increments the reference count of the return value.
There's really no reason to use this function instead of the
common expression \code{\var{o}->ob_type}, which returns a pointer
of type \code{PyTypeObject *}, except when the incremented reference
count is needed.
\bifuncindex{type}
\end{cfuncdesc}
......
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