diff options
author | Guido van Rossum <guido@python.org> | 2003-04-09 18:02:23 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-04-09 18:02:23 (GMT) |
commit | 6db771871ee3ad65109cd9791cc3ef339618f086 (patch) | |
tree | 2118ad26d2bbcc2481b284f8df40decd3466ba8a /Doc/api | |
parent | fc29646a2ee942e39a431d7240ee30f91f2436d3 (diff) | |
download | cpython-6db771871ee3ad65109cd9791cc3ef339618f086.zip cpython-6db771871ee3ad65109cd9791cc3ef339618f086.tar.gz cpython-6db771871ee3ad65109cd9791cc3ef339618f086.tar.bz2 |
Try to discourage use of PyObject_Type().
Diffstat (limited to 'Doc/api')
-rw-r--r-- | Doc/api/abstract.tex | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/api/abstract.tex b/Doc/api/abstract.tex index 0822f62..a8bcc15 100644 --- a/Doc/api/abstract.tex +++ b/Doc/api/abstract.tex @@ -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} |