mirror of https://github.com/python/cpython.git
Added a __contains__ method.
This commit is contained in:
parent
b417936d40
commit
c7554e28ee
|
@ -176,6 +176,9 @@ def keys(self):
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue