MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / get_location

Function get_location

tensorpack/utils/develop.py:128–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126 """
127
128 def get_location():
129 import inspect
130 frame = inspect.currentframe()
131 if frame:
132 callstack = inspect.getouterframes(frame)[-1]
133 return '%s:%i' % (callstack[1], callstack[2])
134 else:
135 stack = inspect.stack(0)
136 entry = stack[2]
137 return '%s:%i' % (entry[1], entry[2])
138
139 def deprecated_inner(func):
140 @functools.wraps(func)

Callers 1

new_funcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected