| Joel Uckelman on Fri, 10 Dec 2004 14:31:59 -0600 (CST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| [nimh-dev] Message problem |
I've encountered a problem with Message that I don't know how to solve. What I'd written for the nimh.Message class wasn't actually being called, due to there being no openessage() method in nimh.Folder. Once I added that, I found that I can't properly construct a nimh.Message. Here's the problem: nimh.Message is a subclass of email.Message. There are only three ways to create an email.Message, by using email.message_from_file(), by using email.Parser, or by using email.Message's ctor directly. email.message_from_file() just calls email.Parser, so effectively those two are the same. email.Parser returns an email.Message, not an nimh.Message, so I don't see how that could be used to get a nimh.Message. The ctor for email.Message takes no arguments---it creates an empty message---and none of the member functions will read in a file. So I don't see how one could ever usefully subclass email.Message without completely rewriting email.Parser to return the subclass. I don't get it. I'm going to commit what I have right now so you guys can see it. _______________________________________________ nimh-dev mailing list nimh-dev@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/nimh-dev