blueloveTH 1 éve
szülő
commit
807294e0eb
1 módosított fájl, 1 hozzáadás és 2 törlés
  1. 1 2
      src/public/cast.c

+ 1 - 2
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;
 }