diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-11-22 19:06:23 -0600 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-11-22 19:06:23 -0600 |
commit | 97f3e35221b818e0ce7c844a9823d38b893b1ecf (patch) | |
tree | 10c1afd4b65dfd867f2238f0e27ae1aa715d129f /Python/Python-ast.c | |
parent | 8798715cfcfad284dab013d08a7102c0df0132fe (diff) | |
parent | c00bc9de47763c1656718bd59c1aea5983c6dfff (diff) | |
download | cpython-97f3e35221b818e0ce7c844a9823d38b893b1ecf.tar.gz |
merge heads
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 3cfb8a87aa..8a101cf3b0 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -690,11 +690,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; } |