Re: fixing the current email module

Matthew Dixon Cowles <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Message-ID <[email protected]>
[me]
> In my opinion, the email module should never raise an exception as a
> result of working with a malformed message.

[Oleg Broytman]
> I disagree. email package is not a user agent, and exceptions are
> *the* way to indicate there are problems.

We may have to agree to disagree. If the email package gives up
because a message is malformed, I don't know what exactly it's for.
It's certainly not for parsing what arrives in my mailbox.

> Then the calling program must catch all exceptions and process they
> in a reasonable (for this particular application) way.

Then the module's documentation would need to include a list of all
exceptions that it might raise and the times that it might raise
them. Otherwise the application developer is proceeding in the dark.

Regards,
Matt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.