diff Doc/lib/libsys.tex @ 15487:f0ca4c67957b legacy-trunk

_getframe(): New sys module function for getting at the stack frame. Implements and closes SF patch #102106, with Guido's suggested documentation changes.
author Barry Warsaw <barry@python.org>
date Wed, 06 Dec 2000 21:47:46 +0000
parents 788b523d4827
children 1a00d21910c8
line wrap: on
line diff
--- a/Doc/lib/libsys.tex	Wed Dec 06 21:45:33 2000 +0000
+++ b/Doc/lib/libsys.tex	Wed Dec 06 21:47:46 2000 +0000
@@ -161,6 +161,17 @@
 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