Return a list of tuples (name, value) for all arguments. If 'var' is set True, also include the variable and keyword arguments when present.
(self, var: bool = False)
| 174 | return saferepr(object) |
| 175 | |
| 176 | def getargs(self, var: bool = False): |
| 177 | """Return a list of tuples (name, value) for all arguments. |
| 178 | |
| 179 | If 'var' is set True, also include the variable and keyword arguments |
| 180 | when present. |
| 181 | """ |
| 182 | retval = [] |
| 183 | for arg in self.code.getargs(var): |
| 184 | try: |
| 185 | retval.append((arg, self.f_locals[arg])) |
| 186 | except KeyError: |
| 187 | pass # this can occur when using Psyco |
| 188 | return retval |
| 189 | |
| 190 | |
| 191 | class TracebackEntry: |