En Fri, 13 Jul 2007 07:38:01 -0300, Tzury <[EMAIL PROTECTED]>  
escribió:

>> Which is a bug in the 'email.message' module, in my view. If it's
>> attempting to support a mapping protocol, it should allow iteration
>> the same way standard Python mappings do: by iterating over the keys.
>
> I thought it is a bug as well, but who am I a python newbie to say so.
> I found inspect.getmembers(msg) as a good solution to map the message
> properties.

Hmmm, I don't see why a message should support iteration, or even why  
iterating over a message should mean iterating over its headers... Anyway,  
if you want to iterate over all the message headers, the simplest way is  
using msg.keys()

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to