'Gives all of the arguments and/or returned values, depending on whether
they are inputs, outputs, etc.
The value for `inout_filter` should be a string containing anything
that arguments\' `inout_state` attribute produces.  Currently, that can be:
* "in" : input
* "out" : output
* "inout" : something that\'s could be input or output (e.g. a struct)
* "ret" : the return value of the C function
* "stat" : the return value of the C function if it is a status code
It can also be a "|"-separated string giving inout states to OR
together.'

def args_by_inout(self, inout_filter, prop=None, join=None):

    result = []
    for arg in self.args:
        if (arg.inout_state in inout_filter.split('|')):
            if (prop is None):
                result.append(arg)
            else:
                result.append(getattr(arg, prop))
    if (join is not None):
        return join.join(result)
    else:
        return result
