'Rename function arguments with new names from *kargs*.'

def renameArguments(self, **kargs):

    for (i, old_name) in enumerate(self.arguments):
        if (old_name in kargs):
            new_name = kargs[old_name]
            self.arguments[i] = new_name
            self.mapping[new_name] = self.mapping[old_name]
            self.mapping[new_name].value = new_name
            del self.mapping[old_name]
