I truly, truly hate email. First you have the __getitem__ and
__setitem__ that work nothing like a dict (no KeyError ever, just
returns None, despite there being a get, silently fails to
overwrite an existing value, no update). But of course they're just
as stupid as a dict if you change the content, instead of associating
the type with that object. And then. decode_header. Does this:
[('Foo', 'utf-8'), ('Bar', None)]
Hint: ('Bar', None) is not a valid list of arguments for creating a
unicode object. I don’t even want to create it myself. I just want
the thing decoded. Ugh, ugh, ugh. Everything that possibly could have
sucked here has sucked. Lots.
One of the reasons I decided to use Maildir is because it takes two
lines of code to turn it into a structured list of objects. Except of
course both of the standard modules that make that possible are horribly
designed. I really don’t want to reimplement this shit. I really don’t
want to go to a “real” database backend where suddenly you can't use
any standard unix tools to do anything and you have to write them all
from scratch.
All software sucks. Down, not across.