def list_headers(general=None, request=None, response=None, entity=None):
 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 (head.category in search)]

def list_headers ( general = None , request = None , response = None , entity = None ) : 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 ( head . category in search ) ]
list all headers for a given category .