rfc822 module problem

Francois Pinard pinard at iro.umontreal.ca
Mon May 19 21:15:06 EDT 2003


[Steven Taschuk]

> Quoth François Pinard:
>   [...]
> > Oh, sorry, I did not express myself clearly.  I meant, "... allows the
> > expression of a date ending plainly with ` +'".

> It doesn't.

>     zone =  [...]
>             / ( ("+" / "-") 4DIGIT )     ; Local differential
>                                          ;  hours+min. (HHMM)

> All four digits are mandatory.  RFC 2822 is much the same.

So, maybe the `rfc822' module should not accept it either.

A generic, encompassing, forgiving multi-format date recogniser could
likely try to grok such kind of errors and read a date nevertheless.
The `rfc822' module does not do enough in the direction of such a general
recogniser to be worth trying to subsume the role, it is not capable
enough.  This being given, the `rfc822' module would probably be more
useful being strict about what RFC 822 (or RFC 2822) dictates.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list