Re: fixing the current email module

Matthew Dixon Cowles <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Message-ID <[email protected]>
[Stephen J. Turnbull]
> Yes, that Unicode error is one that took years for Mailman to work
> around.  If we are going to be converting different objects at
> different times, I'm sure we'll get to see it again in the future.

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.

That is, I think that it's extremely unlikely that the calling
program wants to blow up as a result of a malformed message. Very
probably, it wants to make what sense of the message that it can. The
number of ways in which a message can be malformed is pretty large
and just how (and when, as has been mentioned) any particular error
will cause problems for the module is really a matter that's internal
to the module. The module's user shouldn't have to say, "Over here I
have to trap UnicodeErrors and over there I have to trap IndexErrors".

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.