mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
GH-100530: Change the error message for non-class class patterns (GH-103576)
This commit is contained in:
parent
78cac520c3
commit
07804ce24c
2 changed files with 2 additions and 1 deletions
|
@ -416,7 +416,7 @@ match_class(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 type";
|
||||
const char *e = "called match pattern must be a class";
|
||||
_PyErr_Format(tstate, PyExc_TypeError, e);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue