[Email-SIG] Message instances compare as False

Bill Janssen janssen at parc.com
Fri Apr 24 22:31:09 CEST 2009


I spent the morning finding and fixing a problem in my IMAP server,
which was caused by the fact that certain message instances evaluate as
"False", if they have no headers.  But that's a valid thing to have as
part of a multipart body, I believe.  So I had some code that looked
like this:

   foo = msg1 or msg2

and I was getting msg2 even though I thought I should be getting msg1.

Might make sense to explicitly bind __nonzero__ in this class.

Bill


More information about the Email-SIG mailing list