diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ast.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/ast.c b/Python/ast.c index ecfc14c..d19546a 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -288,7 +288,9 @@ validate_expr(expr_ty exp, expr_context_ty ctx) validate_keywords(exp->v.Call.keywords); case Constant_kind: if (!validate_constant(exp->v.Constant.value)) { - PyErr_SetString(PyExc_TypeError, "invalid type in Constant"); + PyErr_Format(PyExc_TypeError, + "got an invalid type in Constant: %s", + Py_TYPE(exp->v.Constant.value)->tp_name); return 0; } return 1; |