[Email-SIG] fixing the current email module
Barry Warsaw
barry at python.org
Thu Oct 8 15:23:42 CEST 2009
On Oct 8, 2009, at 7:25 AM, Stephen J. Turnbull wrote:
> The email package has access to the wire format, and knows what to do
> with most of it. It should DTRT where that is possible, and punt
> where not. By "punt" I mean return a special object containing as
> much of the meta data for an object as it could recover, along with
> the data itself as a blob.
>
> I would suggest that module utilities that require access to the
> parsed form of data be designed as object methods. The special
> objects produced when broken wire format is encountered wouldn't have
> those methods, and thus they'd fail the duck type test. But that
> makes sense: that "duck" can't quack anyway.
This is a very interesting idea that I think I like!
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 832 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/email-sig/attachments/20091008/088f6983/attachment-0001.pgp>
More information about the Email-SIG
mailing list