summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2000-12-06 21:47:46 (GMT)
committerBarry Warsaw <barry@python.org>2000-12-06 21:47:46 (GMT)
commitb6a54d2a2cd0537be8e013a96068a8ffeaee5847 (patch)
treed356dabe069c2497039ef541e3122fddff1b0e30 /Doc/lib
parente63544f872c4d1af8e76b42b32db79eef12c8902 (diff)
downloadcpython-b6a54d2a2cd0537be8e013a96068a8ffeaee5847.zip
cpython-b6a54d2a2cd0537be8e013a96068a8ffeaee5847.tar.gz
cpython-b6a54d2a2cd0537be8e013a96068a8ffeaee5847.tar.bz2
_getframe(): New sys module function for getting at the stack frame.
Implements and closes SF patch #102106, with Guido's suggested documentation changes.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libsys.tex11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/lib/libsys.tex b/Doc/lib/libsys.tex
index 8199b1b..2fda26e 100644
--- a/Doc/lib/libsys.tex
+++ b/Doc/lib/libsys.tex
@@ -161,6 +161,17 @@ from causing an overflow of the C stack and crashing Python. It can
be set by \function{setrecursionlimit()}.
\end{funcdesc}
+\begin{funcdesc}{_getframe}{\optional{depth}}
+Return a frame object from the call stack. If optional integer
+\var{depth} is given, return the frame object that many calls below
+the top of the stack. If that is deeper than the call stack,
+\exception{ValueError} is raised. The default for \var{depth} is
+zero, returning the frame at the top of the call stack.
+
+This function should be used for internal and specialized
+purposes only.
+\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