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

Method do_up

Lib/pdb.py:1814–1832  ·  view source on GitHub ↗

u(p) [count] Move the current frame count (default one) levels up in the stack trace (to an older frame).

(self, arg)

Source from the content-addressed store, hash-verified

1812 self.error("No exception with that number")
1813
1814 def do_up(self, arg):
1815 """u(p) [count]
1816
1817 Move the current frame count (default one) levels up in the
1818 stack trace (to an older frame).
1819 """
1820 if self.curindex == 0:
1821 self.error('Oldest frame')
1822 return
1823 try:
1824 count = int(arg or 1)
1825 except ValueError:
1826 self.error('Invalid frame count (%s)' % arg)
1827 return
1828 if count < 0:
1829 newframe = 0
1830 else:
1831 newframe = max(0, self.curindex - count)
1832 self._select_frame(newframe)
1833 do_u = do_up
1834
1835 def do_down(self, arg):

Callers

nothing calls this directly

Calls 2

errorMethod · 0.95
_select_frameMethod · 0.95

Tested by

no test coverage detected