summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index fe91975683..f01fae2707 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1211,7 +1211,7 @@ PyUnicode_FromKindAndData(int kind, const void *buffer, Py_ssize_t size)
case PyUnicode_4BYTE_KIND:
return _PyUnicode_FromUCS4(buffer, size);
}
- assert(0);
+ PyErr_SetString(PyExc_ValueError, "invalid kind");
return NULL;
}