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 <1617736028.57.0.404009755359.issue43753@roundup.psfhosted.org>
In-reply-to
Content
Py_IS_TYPE(obj, type) was added to Python 3.9 by bpo-39573:
https://docs.python.org/dev/c-api/structures.html#c.Py_IS_TYPE

commit d905df766c367c350f20c46ccd99d4da19ed57d8
Author: Dong-hee Na <donghee.na92@gmail.com>
Date:   Fri Feb 14 02:37:17 2020 +0900

    bpo-39573: Add Py_IS_TYPE() function (GH-18488)
    
    Co-Author: Neil Schemenauer <nas-github@arctrix.com>

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)
History
Date User Action Args
2021-04-06 19:07:08vstinnersetrecipients: + vstinner
2021-04-06 19:07:08vstinnersetmessageid: <1617736028.57.0.404009755359.issue43753@roundup.psfhosted.org>
2021-04-06 19:07:08vstinnerlinkissue43753 messages
2021-04-06 19:07:08vstinnercreate