This commit is contained in:
blueloveTH 2024-07-08 00:35:44 +08:00
parent a2a093836f
commit 807294e0eb

View File

@ -43,8 +43,7 @@ bool py_istype(const py_Ref self, py_Type type) { return self->type == type; }
bool py_checktype(const py_Ref self, py_Type type) {
if(self->type != type) {
// py_raise(PyExc_TypeError, "expected %s, got %s", py_typename(type), py_typename(self->type));
return false;
return TypeError("expected %t, got %t", type, self->type);
}
return true;
}