From 7b393fc0379d901da657e8fb870171cca71f94f4 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Tue, 19 Sep 2000 20:29:03 +0000 Subject: [PATCH] SF patch 101391: implemented UserList.__contains__. --- Lib/UserList.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/UserList.py b/Lib/UserList.py index 114606098ce..aab511915cc 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