"Gabriel Genellina" <[EMAIL PROTECTED]> writes:

> msg is an instance of MaildirMessage (subclass of Message) - it has
> no specific iterator, so "for m in msg" tries to use the sequence
> protocol, starting at 0; that is, tries to get msg[0]. Message
> objects support the mapping protocol, and msg[0] tries to find a
> *header* 0, converting the name 0 to lowercase, and fails miserably.

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.

-- 
 \            "If you continue running Windows, your system may become |
  `\                 unstable."  -- Microsoft, Windows 95 BSOD message |
_o__)                                                                  |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to