[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: r83890 no longer produces the extra argument in help(). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6678

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Benjamin: Previously, .currentframe() == sys._getframe() == sys._getframe(0) but you redefined it as sys._getframe(1), which is a change in semantics. Is this intentional (ie, was it buggy before)? William: Benjamin's point was that the bug

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/8/9 Terry J. Reedy rep...@bugs.python.org: Terry J. Reedy tjre...@udel.edu added the comment: Benjamin: Previously, .currentframe() == sys._getframe() == sys._getframe(0) but you redefined it as sys._getframe(1), which is a

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: You ignored my question: why did you change the argument passed on to sys._getframe? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6678

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2010/8/9 Terry J. Reedy rep...@bugs.python.org: Terry J. Reedy tjre...@udel.edu added the comment: You ignored my question: why did you change the argument passed on to sys._getframe? Ah, so that the caller's frame is returned and

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Terry: due to the additional indirection by making currentframe() a separate function, _getframe(0) would return the frame in currentframe(). -- ___ Python tracker rep...@bugs.python.org

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Thank you both. I had missed the subtle difference between aliasing and wrapping in this particular case. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6678

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread William Mill
William Mill bill.m...@gmail.com added the comment: This patch is built against trunk, because I'm not sure what branch I should build it against. If that's the wrong branch, I'd be happy to figure it out against the right branch. I tested both the help() and the doc build, both worked as

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Parameter 'depth' needs to be italicized in the function signature also. The old 'trunk' is now frozen with the release of 2.7. The py3k branch is now the actual trunk. Please edit, build against that, and retest. I think the word 'trunk'

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread William Mill
William Mill bill.m...@gmail.com added the comment: I've updated the patch to be based on the py3k branch, and updated the sys module's documentation for _getframe, since inspect just aliases sys._getframe to currentframe(). I've updated the argument list of both inspect.currentframe and

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: Removed file: http://bugs.python.org/file18443/currentframe.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6678 ___

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: A parameter with a default is very much optional. Makes no sense otherwise. In 3.x docs, the square brackets that were used in 2.x and are still used for optional args without default are left off because they are redundant. So in the example

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Technically, inspect.currentframe() doesn't have a depth parameter. It's just implemented by aliasing to sys._getframe() which does. -- nosy: +benjamin.peterson ___ Python tracker

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread William Mill
William Mill bill.m...@gmail.com added the comment: Terry: fair enough, I'll add that it's required to be an integer. I just meant that the brackets seemed not to be around other keyword arguments, not that it's not optional, sorry for being unclear. Ben and/or Terry: Would you prefer the

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-07 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - needs patch versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6678 ___

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-07-08 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The doc string seems correct, so I agree. A condensed and improved version of the docstring (with *depth* italicized as usual) might be inspect.currentframe(depth=0) Return the frame object depth calls below the top of the stack. If there

[issue6678] inspect.currentframe documentation omits optional depth parameter

2009-08-10 Thread William Mill
New submission from William Mill bill.m...@gmail.com: help(inspect.currentframe) reads: - _getframe(...) _getframe([depth]) - frameobject Return a frame object from the call stack. If optional integer depth is given, return the frame object that many calls