On Wed, Oct 07, 2009 at 11:23:24AM -0500, Matthew Dixon Cowles wrote: > In my opinion, the email module should never raise an exception as a > result of working with a malformed message. Though it should > certainly make the information that a message was malformed available > for the calling program to check.
I disagree. email package is not a user agent, and exceptions are *the* way to indicate there are problems. > That is, I think that it's extremely unlikely that the calling > program wants to blow up as a result of a malformed message. Then the calling program must catch all exceptions and process they in a reasonable (for this particular application) way. But certainly email package must not dictate what ways are reasonable - they are too application-specific. > Very > probably, it wants to make what sense of the message that it can. Yes, if email parse a message in some way - ok. You can help by creating more intelligent parser(s). But if a parser stumbles upon an unparseable block - it must raises an exception. Oleg. -- Oleg Broytman http://phd.pp.ru/ p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. _______________________________________________ Email-SIG mailing list Email-SIG@python.org Your options: http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com