diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/exceptions.rst | 10 | ||||
-rw-r--r-- | Doc/library/pickle.rst | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 1a9d0299d5..0a422b238d 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -282,6 +282,16 @@ The following exceptions are the exceptions that are usually raised. handling in C, most floating point operations are not checked. +.. exception:: RecursionError + + This exception is derived from :exc:`RuntimeError`. It is raised when the + interpreter detects that the maximum recursion depth (see + :func:`sys.getrecursionlimit`) is exceeded. + + .. versionadded:: 3.5 + Previously, a plain :exc:`RuntimeError` was raised. + + .. exception:: ReferenceError This exception is raised when a weak reference proxy, created by the diff --git a/Doc/library/pickle.rst b/Doc/library/pickle.rst index 4ce4d345af..e34f2b3993 100644 --- a/Doc/library/pickle.rst +++ b/Doc/library/pickle.rst @@ -425,7 +425,7 @@ The following types can be pickled: Attempts to pickle unpicklable objects will raise the :exc:`PicklingError` exception; when this happens, an unspecified number of bytes may have already been written to the underlying file. Trying to pickle a highly recursive data -structure may exceed the maximum recursion depth, a :exc:`RuntimeError` will be +structure may exceed the maximum recursion depth, a :exc:`RecursionError` will be raised in this case. You can carefully raise this limit with :func:`sys.setrecursionlimit`. |