On Thu, 8 Oct 2009 08:18:40 pm Oleg Broytman wrote:
> > By keeping the various components clear in our mind, we can see
> > that   both statements are correct in a sense.  The parser and
> > generator should never raise exceptions.  The model can and
> > probably should.
>
>    Are you going to parse any garbage and create a Message (probably
> an empty Message) with one defect "cannot parse it at all"?

So long as the raw garbage is available for the caller somehow, that 
seems like a reasonable approach to me. That lets an application 
display "Unparsable message" to the user, who can then ask to "View 
Source" (or equivalent) to get access to the raw bytes of the message.



-- 
Steven D'Aprano
_______________________________________________
Email-SIG mailing list
[email protected]
Your options: 
http://mail.python.org/mailman/options/email-sig/archive%40mail-archive.com

Reply via email to