MaildirMessage

Steve Holden steve at holdenweb.com
Fri Jul 13 08:14:11 EDT 2007


Ben Finney wrote:
> "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[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.
> 
Stop assuming that everyone sees requirements the same as you - the 
author of the email module has long years of experience, and has 
provided an excellent and overall usable piece of software.

Criticisms such as yours are easy (we can all experess our opinions, to 
which we are all entitled), but mere expression of an opinion isn't 
going to change anything. Instead, change the module to do what you 
think it should. Then you can at least use it yourself, and if your code 
is a genuine improvement you can submit it as a patch.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list