summaryrefslogtreecommitdiff
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-11-22 21:52:30 +0100
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2011-11-22 21:52:30 +0100
commit025a9d35b90a5c26c427462569e336c7c46c8388 (patch)
treefca5ae1135dd5ada754c6ee57130231436d733c7 /Python/Python-ast.c
parent0f0a0d9aba0d38c2ca5e665fdc7d6a80124c5dc9 (diff)
downloadcpython-025a9d35b90a5c26c427462569e336c7c46c8388.tar.gz
Issue #13436: commit regenerated Python-ast.c
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 89c07cd602..a276b6cf21 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -622,11 +622,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;
}