summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-07-26 11:32:03 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-07-26 11:32:03 (GMT)
commitc7554e28ee526113281c3fd252c543d063194a60 (patch)
treef9d969155ce5847f95c2295b9b850276fb05906c /Mac
parentb417936d4080004b6a7811fb411c6f77db4cc262 (diff)
downloadcpython-c7554e28ee526113281c3fd252c543d063194a60.zip
cpython-c7554e28ee526113281c3fd252c543d063194a60.tar.gz
cpython-c7554e28ee526113281c3fd252c543d063194a60.tar.bz2
Added a __contains__ method.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/ic.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mac/Lib/ic.py b/Mac/Lib/ic.py
index abe5b69..3c0272c 100644
--- a/Mac/Lib/ic.py
+++ b/Mac/Lib/ic.py
@@ -176,6 +176,9 @@ class IC:
return rv
def has_key(self, key):
+ return self.__contains__(key)
+
+ def __contains__(self, key):
try:
dummy = self.ic.ICFindPrefHandle(key, self.h)
except icglue.error: