Mercurial > cpython-lru_cache-weakref
diff Python/exceptions.c @ 20279:8b3ea7335c1b legacy-trunk
weakref.ReferenceError becomes a built-in exception now that weak ref objects
are moving into the core; with these changes, it will be possible for the
exception to be raised without the weakref module ever being imported.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Fri, 05 Oct 2001 21:50:08 +0000 |
| parents | 5d81c6bff306 |
| children | 639c0a3ae8dc |
line wrap: on
line diff
--- a/Python/exceptions.c Fri Oct 05 21:22:21 2001 +0000 +++ b/Python/exceptions.c Fri Oct 05 21:50:08 2001 +0000 @@ -97,6 +97,7 @@ | | |\n\ | | +-- UnicodeError\n\ | |\n\ + | +-- ReferenceError\n\ | +-- SystemError\n\ | +-- MemoryError\n\ |\n\ @@ -889,6 +890,9 @@ the Python version, and the hardware/OS platform and version."; static char +ReferenceError__doc__[] = "Weak ref proxy used after referent went away."; + +static char MemoryError__doc__[] = "Out of memory."; static char @@ -956,6 +960,7 @@ PyObject *PyExc_SyntaxError; PyObject *PyExc_IndentationError; PyObject *PyExc_TabError; +PyObject *PyExc_ReferenceError; PyObject *PyExc_SystemError; PyObject *PyExc_SystemExit; PyObject *PyExc_UnboundLocalError; @@ -1044,6 +1049,7 @@ FloatingPointError__doc__}, {"ValueError", &PyExc_ValueError, 0, ValueError__doc__}, {"UnicodeError", &PyExc_UnicodeError, &PyExc_ValueError, UnicodeError__doc__}, + {"ReferenceError", &PyExc_ReferenceError, 0, ReferenceError__doc__}, {"SystemError", &PyExc_SystemError, 0, SystemError__doc__}, {"MemoryError", &PyExc_MemoryError, 0, MemoryError__doc__}, /* Warning categories */
