commit | a3a3a030af8579bdd0d3a8d293ee60a1ec8107dc | [log] [tgz] |
---|---|---|
author | Tim Peters <tim.peters@gmail.com> | Thu Nov 30 05:22:44 2000 +0000 |
committer | Tim Peters <tim.peters@gmail.com> | Thu Nov 30 05:22:44 2000 +0000 |
tree | 49d4db03e89d032c9ae7d8a606574392c34aed9b | |
parent | 469d5bb0b4ca8008f271c4425236292b8a55afd6 [diff] [blame] |
Fox for SF bug #123859: %[duxXo] long formats inconsistent.
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 31d1b05..47da4ed 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c
@@ -2897,10 +2897,7 @@ case 'X': if (c == 'i') c = 'd'; - if (PyLong_Check(v) && PyLong_AsLong(v) == -1 - && PyErr_Occurred()) { - /* Too big for a C long. */ - PyErr_Clear(); + if (PyLong_Check(v)) { temp = _PyString_FormatLong(v, flags, prec, c, &pbuf, &len); if (!temp)