[Email-SIG] rfc822 parser (the elephant has landed)

Barry Warsaw barry at python.org
Fri Jun 10 22:47:34 CEST 2011


On Jun 09, 2011, at 04:45 PM, Stephen J. Turnbull wrote:

>R. David Murray writes:
>
> > Yeah, it would be really nice if setting (say) 'To' replaced it, but
> > setting (say) 'Resent-To' appended.  But that way lies chaos :)
>
>Especially since "Resent-To" (and other Resent-*, as well as trace
>headers) needs to be *pre*pended. :)

.insert(i, header) probably, where `i` could either (maybe) be an integer or
the name of the first header to insert the new header before.

>"Enforced", yes, it's out of scope, for several reasons.  However, any
>given application may know at some early stage that headers are
>complete, and want to check policy at that point.  So there should be
>a mechanism to explicitly check policy conformance, perhaps a
>.check_policy() method on Message objects.  Then it becomes a question
>of whether the policy check should ever be called implicitly, or
>always left up to the application.

Smart minds think alike. :)

-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/email-sig/attachments/20110610/4d2ffb6d/attachment-0001.pgp>


More information about the Email-SIG mailing list