On Mar 01, 2011, at 08:45 PM, R. David Murray wrote:

>They don't.  The issue is that what we would like is for the email6 API
>for the address header to be that it looks like a list of Address objects.
>So msg['To'][0] would yield an address object.  But if we also want the
>header to look like a string, that won't work, because as a string that
>should yield the first character of the body of the header.

Here's where things get really interesting because you won't actually know
what msg[header][0] could return for any arbitrary value of 'header'.

For structured headers like To, msg['To'] can return an ordered sequence of
address objects, but what about msg['Received'] or msg['X-Happy-Fun-Ball']?
The same will go for anything like .addresses.

I'm not sure what the implications of this for the API are, but it's important
to keep in mind (I know RDM knows this) that structured headers need extra
parsing and will have more sophisticated objects representing them.

-Barry

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Email-SIG mailing list
Email-SIG@python.org
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to