mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Merge branch 3.2
This commit is contained in:
commit
942d5ba125
5 changed files with 19 additions and 13 deletions
|
@ -844,11 +844,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
|
|||
{
|
||||
int i;
|
||||
if (!PyLong_Check(obj)) {
|
||||
PyObject *s = PyObject_Repr(obj);
|
||||
if (s == NULL) return 1;
|
||||
PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s",
|
||||
PyBytes_AS_STRING(s));
|
||||
Py_DECREF(s);
|
||||
PyErr_Format(PyExc_ValueError, "invalid integer value: %R", obj);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue