def parse_dict_header(value):
 result = {}
 for item in _parse_list_header(value):
  if ('=' not in item):
   result[item] = None
   continue
  (name, value) = item.split('=', 1)
  if (value[:1] == value[(-1):] == '"'):
   value = unquote_header_value(value[1:(-1)])
  result[name] = value
 return result

def parse_dict_header ( value ) : result = { } for item in _parse_list_header ( value ) : if ( '=' not in item ) : result [ item ] = None continue ( name , value ) = item . split ( '=' , 1 ) if ( value [ : 1 ] == value [ ( - 1 ) : ] == '"' ) : value = unquote_header_value ( value [ 1 : ( - 1 ) ] ) result [ name ] = value return result
parse lists of key .