Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b393fc

Browse files
committed
SF patch 101391: implemented UserList.__contains__.
1 parent 4c79919 commit 7b393fc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/UserList.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def __cmp__(self, other):
1717
return cmp(self.data, other.data)
1818
else:
1919
return cmp(self.data, other)
20+
def __contains__(self, item): return item in self.data
2021
def __len__(self): return len(self.data)
2122
def __getitem__(self, i): return self.data[i]
2223
def __setitem__(self, i, item): self.data[i] = item

0 commit comments

Comments
 (0)