R. David Murray added the comment:

Returning the undecoded payload is a good idea.  Let's go with that.

The email module, unlike most stdlib packages, has a mandate that the parser 
should never raise an error.  Instead we do our best to guess (very unlike 
everything else in python!) and note 'defects' in the message.  The reason this 
is the case is Postel's Law, which has become one of the guiding principles in 
dealing with email over the years: "be conservative in what you do, and 
generous in what you accept".  So, the generator will raise errors (if the 
original input didn't come from the parser), but the parser will not, if at all 
possible.

(For those who want aggressive error checking, python3 the 'raise_on_defect' 
policy setting.)

For the versions, we use that field to indicate which versions the bug will get 
fixed in, which is why I removed 3.4.

----------
versions:  -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27397>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to