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

Method get_index

Tools/gdb/libpython.py:1747–1756  ·  view source on GitHub ↗

Calculate index of frame, starting at 0 for the newest frame within this thread

(self)

Source from the content-addressed store, hash-verified

1745 return True
1746
1747 def get_index(self):
1748 '''Calculate index of frame, starting at 0 for the newest frame within
1749 this thread'''
1750 index = 0
1751 # Go down until you reach the newest frame:
1752 iter_frame = self
1753 while iter_frame.newer():
1754 index += 1
1755 iter_frame = iter_frame.newer()
1756 return index
1757
1758 # We divide frames into:
1759 # - "python frames":

Callers 2

print_summaryMethod · 0.95
print_traceback_helperFunction · 0.80

Calls 1

newerMethod · 0.80

Tested by

no test coverage detected