'return a list of tuples (name, value) for all arguments
if \'var\' is set True also include the variable and keyword
arguments when present'

def getargs(self, var=False):

    retval = []
    for arg in self.code.getargs(var):
        try:
            retval.append((arg, self.f_locals[arg]))
        except KeyError:
            pass
    return retval
