human
I wrote the below code

    if (type(condition) in [str, unicode]):
        def smatcher(info):
            return fnmatch.fnmatch(info.filename, condition)
        return smatcher
    elif ((type(condition) in [list, tuple]) and (type(condition[0]) in [int, long])):
        def imatcher(info):
            return (info.index in condition)
        return imatcher
    elif callable(condition):
        return condition
    else:
        raise TypeError

What's a good function header?
assistant
#Here's a good function header.

def condition2checker(condition):