Re: fixing the current email module

"Stephen J. Turnbull" <[email protected]> Fri, 09 Oct 2009 06:29:23 +0900
Newsgroups gmane.comp.python.mime.devel
Message-ID <[email protected]>
Barry Warsaw writes:
 > On Oct 8, 2009, at 3:33 AM, Glenn Linderman wrote:
 > 
 > > Not sure that non-text MIME parts need to support being returned as  
 > > strings.
 > 
 > I don't think they do.

Most non-text media do support comments, though.  I don't know if
extracting comments is a reasonable response to a request for text
from an image, but we should provide a place to put any text that the
callbacks that do the actual work of decoding might return.

 > > However, I think it is proper that a MIME part that is not flagged  
 > > as text/* might produce an error if asked for as text.
 > 
 > +1

That doesn't preclude raising an error/returning a defect object in
many or most use cases, but there may be use cases where it would be
useful to allow a callback on a non-text object to return text.