[Python-bugs-list] [ python-Bugs-676072 ] rfc822.Message() doesn't support __contains__() (+patch)

SourceForge.net noreply@sourceforge.net
Thu, 30 Jan 2003 15:40:22 -0800


Bugs item #676072, was opened at 2003-01-28 08:32
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676072&group_id=5470

Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Michal Vitecek (fufsource)
Assigned to: Barry A. Warsaw (bwarsaw)
Summary: rfc822.Message() doesn't support __contains__() (+patch)

Initial Comment:
class rfc822.Message() should behave like a dictionary
but it doesn't define method __contains__() so it's not
possible to use form:

   'header' in messageInstance

attached is a simple patch that fixes this.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-01-30 18:40

Message:
Logged In: YES 
user_id=80475

I've attached my own version of this patch for Py2.3.
The same solution was used for shelve so that a
single minimal intervention keeps the module
fully synced with mapping interface.  I know this
module is superceded but it doesn't hurt to sync-up
its interface for those who still use it.

Barry, if it meets your approval please reassign
back to me.  

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=676072&group_id=5470