SF patch 101391: implemented UserList.__contains__.

This commit is contained in:
Tim Peters 2000-09-19 20:29:03 +00:00
parent 4c799191a2
commit 7b393fc037
1 changed files with 1 additions and 0 deletions

View File

@ -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