gh-144702: Use standard terminology in class pattern error message (#144703)

This commit is contained in:
David Peter 2026-02-19 14:31:13 +01:00 committed by GitHub
parent 52794cba13
commit 1d099164bc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -534,7 +534,7 @@ _PyEval_MatchClass(PyThreadState *tstate, PyObject *subject, PyObject *type,
Py_ssize_t nargs, PyObject *kwargs)
{
if (!PyType_Check(type)) {
const char *e = "called match pattern must be a class";
const char *e = "class pattern must refer to a class";
_PyErr_Format(tstate, PyExc_TypeError, e);
return NULL;
}