mirror of
https://github.com/python/cpython.git
synced 2024-11-29 21:05:33 +08:00
Try to discourage use of PyObject_Type().
This commit is contained in:
parent
fc29646a2e
commit
6db771871e
@ -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}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user