[Python-checkins] python/dist/src/Mac/Lib ic.py,1.5,1.6
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Fri, 26 Jul 2002 04:32:05 -0700
Update of /cvsroot/python/python/dist/src/Mac/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv13009
Modified Files:
ic.py
Log Message:
Added a __contains__ method.
Index: ic.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Lib/ic.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ic.py 25 Aug 2001 12:05:18 -0000 1.5
--- ic.py 26 Jul 2002 11:32:03 -0000 1.6
***************
*** 177,180 ****
--- 177,183 ----
def has_key(self, key):
+ return self.__contains__(key)
+
+ def __contains__(self, key):
try:
dummy = self.ic.ICFindPrefHandle(key, self.h)