[New-bugs-announce] [issue6678] inspect.currentframe documentation omits optional depth parameter

William Mill report at bugs.python.org
Mon Aug 10 20:25:01 CEST 2009

New submission from William Mill <bill.mill at gmail.com>:

help(inspect.currentframe) reads:

    _getframe([depth]) -> frameobject

Return a frame object from the call stack.  If optional integer depth is
given, return the frame object that many calls below the top of the
stack. If that is deeper than the call stack, ValueError is raised.  The
default for depth is zero, returning the frame at the top of the call stack.
This function should be used for internal and specialized
purposes only.

The python library documentation, however, doesn't mention the optional
depth parameter:

    Return the frame object for the caller’s stack frame.

I think substituting the help() text for the library documentation's
text would be an improvement.

assignee: georg.brandl
components: Documentation
messages: 91459
nosy: georg.brandl, llimllib
severity: normal
status: open
title: inspect.currentframe documentation omits optional depth parameter
type: feature request
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1, Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list