Re: fixing the current email module
"Stephen J. Turnbull" <[email protected]> Fri, 09 Oct 2009 04:31:36 +0900
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Message-ID | <[email protected]> |
Oleg Broytman writes: > On Fri, Oct 09, 2009 at 12:31:43AM +0900, Stephen J. Turnbull wrote: > > Oleg Broytman writes: > > > > I can think of no input for which the parser should *ever* throw an > > > > exception. > > > > > > Are you saying that even a random garbage would be parsed to a Message > > > of some kind? No headers, a single unparsed body?.. > > > > As long as it contains no NULs or high-bit-set octets, and is > > separated into at least two parts, each less than 998 characters long, > > by a CRLF > > After all, you can think of input that should make a parser to raise an > exception, can't you? No, to throw an error on the example above would be a felony, life sentence. Throwing an error on something that had 8-bit octets in it probably wouldn't be a crime, but I'd sue, and any jury in the land would award treble damages. Better try for a change of venue to Moscow.<wink>