// int PyType_IsSubtype(PyTypeObject *a, PyTypeObject *b) // Return true if a is a subtype of b. // // New in version 2.2. func PyType_IsSubtype(a, b *PyTypeObject) bool { return int2bool(C.PyType_IsSubtype(a.ptr, b.ptr)) }
// IsSubtype returns true if "t" is a subclass of "t2". func (t *Type) IsSubtype(t2 *Type) bool { return C.PyType_IsSubtype(&t.o, &t2.o) == 1 }