[issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed
R. David Murray
report at bugs.python.org
Thu Jun 15 21:25:02 EDT 2017
R. David Murray added the comment:
The problem is that if it returns None on parse failure, then you can't tell the difference between the header not existing and the date not being parseable. I don't have a solution for this problem. Suggestions welcome. (Note that this is only a problem in the new policy, where the parsing is done automatically; in the compat32 policy you have to apply parsedate yourself, so you can tell the difference between a non-existent header and a failed date parse).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30681>
_______________________________________
More information about the Python-bugs-list
mailing list