From: Michael Foord Date: Sun, 13 Sep 2009 16:46:19 +0000 (+0000) Subject: Note that sys._getframe is not guaranteed to exist in all implementations of Python... X-Git-Tag: v2.7a1~552 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=668be589ef5700aa1d7fd29e9f0b528824804d07;p=python Note that sys._getframe is not guaranteed to exist in all implementations of Python, and a corresponding note in inspect.currentframe. Issue 6712. --- diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index bea12c9f63..ac89850639 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -567,6 +567,11 @@ line. Return the frame object for the caller's stack frame. + This function relies on Python stack frame support in the interpreter, which + isn't guaranteed to exist in all implementations of Python. If running in + an implmentation without Python stack frame support this function returns + ``None``. + .. function:: stack([context]) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 0005792774..7a3f642e42 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -417,7 +417,8 @@ always available. that is deeper than the call stack, :exc:`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. + This function should be used for internal and specialized purposes only. It + is not guaranteed to exist in all implementations of Python. .. function:: getprofile()