[Email-SIG] SF bug #1017329
t-meyer at ihug.co.nz
Mon Nov 1 05:28:09 CET 2004
[Not sure if you wanted discussion here or in the tracker, so guessed here.
Sorry if that was wrong.]
> This one wants to extend the Message API by enabling
> iteration over headers. I'd like to get your opinion about
> whether this would be a useful thing (or even a good thing
> <wink>), and whether to add this for Python 2.4/email 3.0.
Iteration over headers is already provided by:
>>> msg = email.message_from_file(open("d:\\example.txt"))
>>> for i in msg.keys():
... print i
Isn't it? (Works for me, anyway). I wouldn't expect that "for i in msg:"
would iterate only through the headers - I would expect the body [parts] to
be iterated through somehow, too.
So -0 from me. +1 on raising a more understandable error, though, if that's
> This might be considered a new feature rather than a bug so
> perhaps it missed the Python 2.4 beta cut.
I'd definitely say it was a feature rather than a bug.
More information about the Email-SIG