[Email-SIG] fixing the current email module

Stephen J. Turnbull stephen at xemacs.org
Thu Oct 8 12:46:50 CEST 2009


Barry Warsaw writes:

 > I've also heard convincing arguments from folks in the Python
 > community in both camps: "using anything other than strings
 > internally is insane; no, using anything other than bytes
 > internally is insane."

They're both right, of course.  The problem is figuring out who is
right when. ;-)

 > For example, we currently represent header values as 8-bit strings or  
 > Header instances. The latter can contain triples of the individual  
 > chunks, e.g. (content, language, charset).  I think we need represent  
 > header values as instances in all cases because the type checking is  
 > error prone, but even then, it makes for difficult API choices.   

Agreed on both the need and the difficulty.

 > Just to ramble a little longer, it's been argued that we should give  
 > up on idempotency, but I'm not convinced.

If we can't achieve ... ah, isn't "invertibility" what you mean here?
... "idempotency", then we're dropping information somewhere along the
line.  Also, there are part types (pgp-signed, I'm looking at you)
where it's absolutely essential that we be able to roundtrip the body
byte for byte.  So I'm -1 on giving up.



More information about the Email-SIG mailing list