Mike Peachey wrote:
>
>I'm using this anyway :-)
>
>if msg.has_key('x-no-subject-prefix') and msg.get('x-no-subject-prefix',
>'').lower() == 'yes':
You don't need to test separately for the presence of the header.
That's what the second argument to msg.get() is for. It is returned
when the header named in the first argument isn't present, so the
above can be simplified to
if msg.get('x-no-subject-prefix', '').lower() == 'yes':
which is true if and only if there is an 'x-no-subject-prefix' header
with value 'yes'
--
Mark Sapiro <[EMAIL PROTECTED]> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org
Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp