[issue9864] email.utils.{parsedate, parsedate_tz} should have better return types

Jeffrey Finkelstein report at bugs.python.org
Tue Sep 28 02:36:53 CEST 2010


Jeffrey Finkelstein <jeffrey.finkelstein at gmail.com> added the comment:

Here's a patch for the python-email6 branch.

It seemed to make sense to remove parsedate_tz() and mktime_tz() here, since the parsedate() function now returns a datetime object, including timezone information (if it was parsed from the input string).

Also required updating several tests to work with the new return type, and removing a test that checked if the returned value of parsedate() (a time tuple) was "acceptable" for use with functions from the time module.

----------
Added file: http://bugs.python.org/file19040/issue9864.datetime.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9864>
_______________________________________


More information about the Python-bugs-list mailing list