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

Method do_retval

Lib/pdb.py:2088–2099  ·  view source on GitHub ↗

retval Print the return value for the last return of a function.

(self, arg)

Source from the content-addressed store, hash-verified

2086 do_a = do_args
2087
2088 def do_retval(self, arg):
2089 """retval
2090
2091 Print the return value for the last return of a function.
2092 """
2093 if arg:
2094 self._print_invalid_arg(arg)
2095 return
2096 if '__return__' in self.curframe.f_locals:
2097 self.message(self._safe_repr(self.curframe.f_locals['__return__'], "retval"))
2098 else:
2099 self.error('Not yet returned!')
2100 do_rv = do_retval
2101
2102 def _getval(self, arg):

Callers

nothing calls this directly

Calls 4

_print_invalid_argMethod · 0.95
messageMethod · 0.95
_safe_reprMethod · 0.95
errorMethod · 0.95

Tested by

no test coverage detected