[Email-SIG] API for Header objects [was: Dropping bytes "support" in json]

Stephen J. Turnbull turnbull at sk.tsukuba.ac.jp
Tue Apr 14 11:11:53 CEST 2009


Tony Nelson writes:

 > Assuming that by "Destination" you mean a class of Address header fields,
 > as there is no Destionation: header field, such header fields contain
 > addresses, which can be considered to contain (as the email package does) a
 > list of (name, email address) pairs, or, at a lower level, to also have
 > Comments, there is indeed only one correct choice, which is the one the
 > email package currently provides the diligent user.  I wish it to be the
 > one obvious choice, so that less study is needed to properly use the email
 > package.

As you point out above, display names and comments are different.
It's *not* obvious to me that they should be confounded by default.

In any case, it would certainly be possible to implement both the
indexing feature, so that msg['To'][0] returns a (display, mailbox)
tuple, and a converter so that list(msg['to']) returns a list of such
tuples (in both cases, assuming that most users prefer not to
distinguish comments from display names).



More information about the Email-SIG mailing list