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

Method globaltrace_trackcallers

Lib/trace.py:511–520  ·  view source on GitHub ↗

Handler for call events. Adds information about who called who to the self._callers dict.

(self, frame, why, arg)

Source from the content-addressed store, hash-verified

509 return filename, modulename, funcname
510
511 def globaltrace_trackcallers(self, frame, why, arg):
512 """Handler for call events.
513
514 Adds information about who called who to the self._callers dict.
515 """
516 if why == 'call':
517 # XXX Should do a better job of identifying methods
518 this_func = self.file_module_function_of(frame)
519 parent_func = self.file_module_function_of(frame.f_back)
520 self._callers[(parent_func, this_func)] = 1
521
522 def globaltrace_countfuncs(self, frame, why, arg):
523 """Handler for call events.

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected