Mark Sapiro wrote:
> 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'
> 

Ta.
-- 
Kind Regards,

__________________________________________________

Mike Peachey, IT
Tel: +44 114 281 2655
Fax: +44 114 281 2951
Jennic Ltd, Furnival Street, Sheffield, S1 4QT, UK
Comp Reg No: 3191371 - Registered In England
http://www.jennic.com
__________________________________________________
------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
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

Reply via email to