summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libsys.tex18
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index bbea623..ac28e6f 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -148,6 +148,13 @@ generally one higher than you might expect, because it includes the
(temporary) reference as an argument to \function{getrefcount()}.
\end{funcdesc}
+\begin{funcdesc}{getrecursionlimit}{}
+Return the current value of the recursion limit, the maximum depth of
+the Python interpreter stack. This limit prevents infinite recursion
+from causing an overflow of the C stack and crashing Python. It can
+be set by \function{setrecursionlimit}.
+\end{funcdesc}
+
\begin{datadesc}{hexversion}
The version number encoded as a single integer. This is guaranteed to
increase with each version, including proper support for
@@ -275,6 +282,17 @@ maximizing responsiveness as well as overhead.
\index{profile function}
\index{profiler}
+\begin{funcdesc}{setrecursionlimit}{limit}
+Set the maximum depth of the Python interpreter stack to \var{limit}.
+This limit prevents infinite recursion from causing an overflow of the
+C stack and crashing Python.
+
+The highest possible limit is platform-dependent. A user may need to
+set the limit higher when she has a program that requires deep
+recursion and a platform that supports a higher limit. This should be
+done with care, because a too-high limit can lead to a crash.
+\edn{funcdesc}
+
\begin{funcdesc}{settrace}{tracefunc}
Set the system's trace function, which allows you to implement a
Python source code debugger in Python. See section ``How It Works''