MCPcopy Index your code
hub / github.com/python/cpython / currentframe

Function currentframe

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 as exc:
171 return exc.__traceback__.tb_frame.f_back
172
173#
174# _srcfile is used when walking the stack to check when we've got the first

Callers 1

findCallerMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…