Example #1
0
// 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))
}
Example #2
0
File: type.go Project: MogeiWang/py
// 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
}