def dump_options_header(header, options):
 segments = []
 if (header is not None):
  segments.append(header)
 for (key, value) in iteritems(options):
  if (value is None):
   segments.append(key)
  else:
   segments.append(('%s=%s' % (key, quote_header_value(value))))
 return '; '.join(segments)

def dump_options_header ( header , options ) : segments = [ ] if ( header is not None ) : segments . append ( header ) for ( key , value ) in iteritems ( options ) : if ( value is None ) : segments . append ( key ) else : segments . append ( ( '%s=%s' % ( key , quote_header_value ( value ) ) ) ) return '; ' . join ( segments )
the reverse function to :func:parse_options_header .