def raw_encode(data):
 content_type = 'application/data'
 payload = data
 if isinstance(payload, text_t):
  content_encoding = 'utf-8'
  with _reraise_errors(EncodeError, exclude=()):
   payload = payload.encode(content_encoding)
 else:
  content_encoding = 'binary'
 return (content_type, content_encoding, payload)

def raw_encode ( data ) : content_type = 'application/data' payload = data if isinstance ( payload , text_t ) : content_encoding = 'utf-8' with _reraise_errors ( EncodeError , exclude = ( ) ) : payload = payload . encode ( content_encoding ) else : content_encoding = 'binary' return ( content_type , content_encoding , payload )
special case serializer .