diff options
author | Tim Peters <tim.peters@gmail.com> | 2000-09-19 20:29:03 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2000-09-19 20:29:03 (GMT) |
commit | 7b393fc0379d901da657e8fb870171cca71f94f4 (patch) | |
tree | a3b33a94289506ee83fc14a9858a62e77a48fd5d /Lib/UserList.py | |
parent | 4c799191a2019d21fbeca07ab459751ec857ef0c (diff) | |
download | cpython-7b393fc0379d901da657e8fb870171cca71f94f4.zip cpython-7b393fc0379d901da657e8fb870171cca71f94f4.tar.gz cpython-7b393fc0379d901da657e8fb870171cca71f94f4.tar.bz2 |
SF patch 101391: implemented UserList.__contains__.
Diffstat (limited to 'Lib/UserList.py')
-rw-r--r-- | Lib/UserList.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/UserList.py b/Lib/UserList.py index 1146060..aab5119 100644 --- a/Lib/UserList.py +++ b/Lib/UserList.py @@ -17,6 +17,7 @@ class UserList: return cmp(self.data, other.data) else: return cmp(self.data, other) + def __contains__(self, item): return item in self.data def __len__(self): return len(self.data) def __getitem__(self, i): return self.data[i] def __setitem__(self, i, item): self.data[i] = item |