예제 #1
0
파일: type.go 프로젝트: gward/go-python
// 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))
}
예제 #2
0
파일: type.go 프로젝트: 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
}