bignose+hates-spam at benfinney.id.au
Fri Jul 13 08:26:59 CEST 2007
"Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> 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. Message
> objects support the mapping protocol, and msg 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 |
More information about the Python-list