MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / currentframe

Function currentframe

tools/python-3.11.9-amd64/Lib/logging/__init__.py:166–171  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

164 currentframe = lambda: sys._getframe(1)
165else: #pragma: no cover
166 def currentframe():
167 """Return the frame object for the caller's stack frame."""
168 try:
169 raise Exception
170 except Exception:
171 return sys.exc_info()[2].tb_frame.f_back
172
173#
174# _srcfile is used when walking the stack to check when we've got the first

Callers 2

findCallerMethod · 0.70
_caller_frame_infoMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected