[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thank you both. I had missed the subtle difference between aliasing and wrapping in this particular case. -- ___ Python tracker ___ ___

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Georg Brandl
Georg Brandl 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 _

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/8/9 Terry J. Reedy : > > Terry J. Reedy 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 not currentframe's. -- _

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: You ignored my question: why did you change the argument passed on to sys._getframe? -- ___ Python tracker ___

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/8/9 Terry J. Reedy : > > Terry J. Reedy 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 b

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Terry J. Reedy
Terry J. Reedy 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 was not the doc bu

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-09 Thread Benjamin Peterson
Benjamin Peterson added the comment: r83890 no longer produces the extra argument in help(). -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread William Mill
William Mill 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 inspect.currentframe d

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Benjamin Peterson
Benjamin Peterson 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 Terry J. Reedy
Terry J. Reedy 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 you depict, cont

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Terry J. Reedy
Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file18443/currentframe.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread William Mill
William Mill 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 sys._getframe to reflec

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy 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' will go away with th

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-08 Thread William Mill
William Mill 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 expected. I will happi

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-08-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: -> needs patch versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue6678] inspect.currentframe documentation omits optional depth parameter

2010-07-08 Thread Terry J. Reedy
Terry J. Reedy 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 is none, raise Va

[issue6678] inspect.currentframe documentation omits optional depth parameter

2009-08-10 Thread William Mill
New submission from William Mill : 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 below the top of th