[Email-SIG] SF bug #1017329

Barry Warsaw barry at python.org
Mon Nov 1 14:38:27 CET 2004


On Sun, 2004-10-31 at 23:28, Tony Meyer wrote:

> Iteration over headers is already provided by:
> 
> import email
> >>> msg = email.message_from_file(open("d:\\example.txt"))
> >>> for i in msg.keys():
> ... 	print i
> ... 	

Good point.  I wouldn't expect a Message had so many keys that
instantiating a list would be prohibitively expensive.

> So -0 from me.  +1 on raising a more understandable error, though, if that's
> not difficult.

I generally dislike isinstance() tests or try/excepts just to transform
one exception into another, so I think we'll leave things the way they
are and close the bug as Won't Fix.

Thanks,
-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/email-sig/attachments/20041101/14e58cef/attachment.pgp


More information about the Email-SIG mailing list