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

Method do_args

Lib/pdb.py:2067–2085  ·  view source on GitHub ↗

a(rgs) Print the argument list of the current function.

(self, arg)

Source from the content-addressed store, hash-verified

2065 return self.do_quit(arg)
2066
2067 def do_args(self, arg):
2068 """a(rgs)
2069
2070 Print the argument list of the current function.
2071 """
2072 if arg:
2073 self._print_invalid_arg(arg)
2074 return
2075 co = self.curframe.f_code
2076 dict = self.curframe.f_locals
2077 n = co.co_argcount + co.co_kwonlyargcount
2078 if co.co_flags & inspect.CO_VARARGS: n = n+1
2079 if co.co_flags & inspect.CO_VARKEYWORDS: n = n+1
2080 for i in range(n):
2081 name = co.co_varnames[i]
2082 if name in dict:
2083 self.message('%s = %s' % (name, self._safe_repr(dict[name], name)))
2084 else:
2085 self.message('%s = *** undefined ***' % (name,))
2086 do_a = do_args
2087
2088 def do_retval(self, arg):

Callers

nothing calls this directly

Calls 3

_print_invalid_argMethod · 0.95
messageMethod · 0.95
_safe_reprMethod · 0.95

Tested by

no test coverage detected