This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2021-04-06.19:07:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Py_IS_TYPE(obj, type) was added to Python 3.9 by bpo-39573:

commit d905df766c367c350f20c46ccd99d4da19ed57d8
Author: Dong-hee Na <>
Date:   Fri Feb 14 02:37:17 2020 +0900

    bpo-39573: Add Py_IS_TYPE() function (GH-18488)
    Co-Author: Neil Schemenauer <>

It's currently implemented as:

static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
    return Py_TYPE(ob) == type;
#define Py_IS_TYPE(ob, type) _Py_IS_TYPE(_PyObject_CAST_CONST(ob), type)
Date User Action Args
2021-04-06 19:07:08vstinnersetrecipients: + vstinner
2021-04-06 19:07:08vstinnersetmessageid: <>
2021-04-06 19:07:08vstinnerlinkissue43753 messages
2021-04-06 19:07:08vstinnercreate