Return a tuple with the argument names for the code object. If 'var' is set True also return the names of the variable and keyword arguments when present.
(self, var: bool = False)
| 112 | return Source(self.raw) |
| 113 | |
| 114 | def getargs(self, var: bool = False) -> Tuple[str, ...]: |
| 115 | """Return a tuple with the argument names for the code object. |
| 116 | |
| 117 | If 'var' is set True also return the names of the variable and |
| 118 | keyword arguments when present. |
| 119 | """ |
| 120 | # Handy shortcut for getting args. |
| 121 | raw = self.raw |
| 122 | argcount = raw.co_argcount |
| 123 | if var: |
| 124 | argcount += raw.co_flags & CO_VARARGS |
| 125 | argcount += raw.co_flags & CO_VARKEYWORDS |
| 126 | return raw.co_varnames[:argcount] |
| 127 | |
| 128 | |
| 129 | class Frame: |
no outgoing calls