[Python-Dev] Patch making the current email package (mostly) support bytes

Barry Warsaw barry at python.org
Fri Oct 8 20:22:28 CEST 2010


On Oct 09, 2010, at 02:48 AM, Stephen J. Turnbull wrote:

>Right.  That's where I was going with my comment to Barry about the
>Received headers.  Even if email isn't going to serve clients working
>with wire format, it needs to deal with those headers.  But where I
>think the headers defined by RFC 822 should be stored as str in
>email6, I am leaning toward storing Received headers verbatim as bytes
>(including any RFC 822 folding whitespace) because of the RFC 5321
>requirement that they be preserved exactly.

I think then you'd have to have two different APIs.  It'll just be too
confusing and error prone to return either bytes or strs from header value
accessors depending on the header name.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101008/b341df27/attachment.pgp>


More information about the Python-Dev mailing list