rfc822 module bug?

Tony Meyer t-meyer at ihug.co.nz
Mon Aug 1 19:16:45 EDT 2005


[rfc822 module bug]
>> Date: Tue,26 Jul 2005 13:14:27 GMT +0200
>>
>> It seems to be correct¹, but parsedate_tz is not able to 
>> decode it, it is confused by the absence of a space after
>> the ",".
[...]
> I think I'll submit this bug on the Python web-site.

Please don't.  The rfc822 module is deprecated from Python 2.3 in favour of
the email package.  This bug does not exist in the email package (at least
in Python 2.4).  For example:

>>> import rfc822
>>> rfc822.parsedate_tz("Tue, 26 Jul 2005 13:14:27 GMT +0200")
(2005, 7, 26, 13, 14, 27, 0, 1, 0, 0)
>>> rfc822.parsedate_tz("Tue,26 Jul 2005 13:14:27 GMT +0200")

>>> import email
>>> import email.Utils
>>> email.Utils.parsedate_tz("Tue, 26 Jul 2005 13:14:27 GMT +0200")
(2005, 7, 26, 13, 14, 27, 0, 1, 0, 0)
>>> email.Utils.parsedate_tz("Tue,26 Jul 2005 13:14:27 GMT +0200")
(2005, 7, 26, 13, 14, 27, 0, 1, 0, 0)

=Tony.Meyer




More information about the Python-list mailing list