Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38f331b

Browse files
committed
Limit the length of typename to 500 in error message
1 parent c23165b commit 38f331b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/structseq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ structseq_replace(PyStructSequence *self, PyObject *args, PyObject *kwargs)
387387
}
388388
if (n_unnamed_fields > 0) {
389389
PyErr_Format(PyExc_TypeError,
390-
"__replace__() is not supported for %s "
390+
"__replace__() is not supported for %.500s "
391391
"because it has unnamed field(s)",
392392
Py_TYPE(self)->tp_name);
393393
return NULL;

0 commit comments

Comments
 (0)