email.Utils.parseaddr() gives arcane result
slash_dev_slash_null_2000 at yahoo.com
Sun Jan 8 19:55:47 CET 2006
email.Utils.parseaddr('Real Name ((comment)) <address at example.com>')
('comment <address at example.com>', 'Real')
Granted the string above is invalid as RFC 2822 does not allow
parentheses within comments, but most mail agents seem to at least take
the contents of the angle brackets as the address.
rfc822.parseaddr() returns the same result in this case.
If these functions aren't going to return their respective failure
indication in this case, I think they should at least return
'address at example.com' as the second item of the returned tuple.
(for email use this address please - you can figure it out)
Mark Sapiro msapiro -at- value net Any clod can have the facts;
San Francisco Bay Area, California having opinions is an art. -
C. McCabe, The Fearless Spectator
More information about the Python-list