def str_func(name):
def func(mapping, bind, values):<EOL><INDENT>for v in values:<EOL><INDENT>if isinstance(v, six.string_types):<EOL><INDENT>v = getattr(v, name)()<EOL><DEDENT>yield v<EOL><DEDENT><DEDENT>return func<EOL>
Apply functions like upper(), lower() and strip().