[Email-SIG] API for Header objects [was: Dropping bytes "support" in json]
Stephen J. Turnbull
stephen at xemacs.org
Wed Apr 15 10:47:07 CEST 2009
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.
More information about the Email-SIG
mailing list