Skip to content

Commit 490cd3f

Browse files
skirpichevvstinner
andauthored
Update Objects/floatobject.c
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 43657bf commit 490cd3f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Objects/floatobject.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,10 @@ float_richcompare(PyObject *v, PyObject *w, int op)
474474
if (ww == NULL)
475475
goto Error;
476476
else if (!PyLong_Check(ww)) {
477-
PyErr_SetString(PyExc_TypeError,
478-
"unexpected type from negation "
479-
"of integer operand");
477+
PyErr_Format(PyExc_TypeError,
478+
"unexpected type from negation "
479+
"of integer operand; expected int, got %T",
480+
ww);
480481
goto Error;
481482
}
482483
}

0 commit comments

Comments
 (0)