Index: Python/sysmodule.c =================================================================== --- Python/sysmodule.c (revision 83857) +++ Python/sysmodule.c (working copy) @@ -782,13 +782,8 @@ PyDoc_STRVAR(getframe_doc, "_getframe([depth]) -> frameobject\n\ \n\ -Return a frame object from the call stack. If optional integer depth is\n\ -given, return the frame object that many calls below the top of the stack.\n\ -If that is deeper than the call stack, ValueError is raised. The default\n\ -for depth is zero, returning the frame at the top of the call stack.\n\ -\n\ -This function should be used for internal and specialized\n\ -purposes only." +Return the frame object depth calls below the top of the stack. If there\n\ +is none, raise ValueError." ); static PyObject * Index: Doc/library/inspect.rst =================================================================== --- Doc/library/inspect.rst (revision 83857) +++ Doc/library/inspect.rst (working copy) @@ -593,9 +593,10 @@ raised. -.. function:: currentframe() +.. function:: currentframe(depth=0) - Return the frame object for the caller's stack frame. + Return the frame object *depth* calls below the top of the stack. If there is + none, raise ValueError. .. impl-detail::