Mercurial > cpython-lru_cache-weakref
diff Objects/stringobject.c @ 15579:31d78f361530 legacy-trunk
[ Patch #102852 ] Make % error a bit more informative by indicates the
index at which an unknown %-escape was found
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Fri, 15 Dec 2000 13:07:46 +0000 |
| parents | 07705177ca6b |
| children | f7f3be3d00b9 |
line wrap: on
line diff
--- a/Objects/stringobject.c Fri Dec 15 05:41:49 2000 +0000 +++ b/Objects/stringobject.c Fri Dec 15 13:07:46 2000 +0000 @@ -2939,8 +2939,9 @@ break; default: PyErr_Format(PyExc_ValueError, - "unsupported format character '%c' (0x%x)", - c, c); + "unsupported format character '%c' (0x%x) " + "at index %i", + c, c, fmt - 1 - PyString_AsString(format)); goto error; } if (sign) {
