On Fri, 11 Mar 2016 22:00:41 +0000, Grant Edwards wrote: > Since they behave differently, perhaps the question ought to be "which > does what you want to do?"
For parsed msgs, I had this: elif hasattr (msg.msgBody, 'request'): It occurred to me that this was less abstruse: elif 'request' in msg.msgBody: and by the way, how would you do that with duck-typing? If I were doing this anew, I probably use a dictionary of functors, but that's not an option anymore. -- https://mail.python.org/mailman/listinfo/python-list