def list_headers(general=None, request=None, response=None, entity=None):
    " list all headers for a given category "
    if not (general or request or response or entity):
        general = request = response = entity = True
    search = []
    for (bool, strval) in ((general, 'general'), (request, 'request'),
                           (response, 'response'), (entity, 'entity')):
        if bool:
            search.append(strval)
    return [head for head in _headers.values() if search in head.category]
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Paste-2.0.1/paste/httpheaders.py/list_headers/swapped operands of `in`