diff --git a/src/public/cast.c b/src/public/cast.c index f9748924..1dee7d68 100644 --- a/src/public/cast.c +++ b/src/public/cast.c @@ -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; } \ No newline at end of file