Mercurial > cpython-lru_cache-weakref
comparison Python/pythonrun.c @ 24839:17e95cc06f69 legacy-trunk
provide less mysterious error messages when seeing end-of-line in
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Thu, 15 Aug 2002 01:20:16 +0000 |
| parents | 06f1e2fd05bc |
| children | 0231cc54f87e |
comparison
equal
deleted
inserted
replaced
| 24838:aea68cb36859 | 24839:17e95cc06f69 |
|---|---|
| 1245 } | 1245 } |
| 1246 break; | 1246 break; |
| 1247 case E_TOKEN: | 1247 case E_TOKEN: |
| 1248 msg = "invalid token"; | 1248 msg = "invalid token"; |
| 1249 break; | 1249 break; |
| 1250 case E_EOFS: | |
| 1251 msg = "EOF while scanning triple-quoted string"; | |
| 1252 break; | |
| 1253 case E_EOLS: | |
| 1254 msg = "EOL while scanning single-quoted string"; | |
| 1255 break; | |
| 1250 case E_INTR: | 1256 case E_INTR: |
| 1251 PyErr_SetNone(PyExc_KeyboardInterrupt); | 1257 PyErr_SetNone(PyExc_KeyboardInterrupt); |
| 1252 Py_XDECREF(v); | 1258 Py_XDECREF(v); |
| 1253 return; | 1259 return; |
| 1254 case E_NOMEM: | 1260 case E_NOMEM: |
