Tony Nelson writes:

 > Well, msg['To'] would return a list (or tuple) of addresses (which
 > are tuples), so msg['To'][0] would return the first such address,
 > if any.  No converter required.

How do you propose to spell

    msg['To'].split_addresses()[0]

where the split_addresses method returns a list of addresses in their
original form?  And is it really worth losing the consistency that
str(msg[tag]) and bytes(msg[tag]) (especially the latter) do something
more or less useful regardless of whether 'tag' names a structured
field or a text field?

As I wrote elsewhere, I don't *know* that such features will be useful
or practically implementable, but I do think what you're suggesting is
premature and overly restrictive.  Especially since we are pretty sure
(due to the desire for idempotency) that internally msg['To'] will
*not* be a sequence of addresses parsed into display name and mailbox.
_______________________________________________
Email-SIG mailing list
[email protected]
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to