From f8b3b944aa748be7689109c353e990e8a25c684f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 9 Dec 1998 22:15:01 +0000 Subject: [PATCH] In __getslice__, use self.__class__ instead of UserList. --- Lib/UserList.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/UserList.py b/Lib/UserList.py index 5dfd182807f..1d5065fa245 100644 --- a/Lib/UserList.py +++ b/Lib/UserList.py @@ -19,7 +19,7 @@ def __getitem__(self, i): return self.data[i] def __setitem__(self, i, item): self.data[i] = item def __delitem__(self, i): del self.data[i] def __getslice__(self, i, j): - userlist = UserList() + userlist = self.__class__() userlist.data[:] = self.data[i:j] return userlist def __setslice__(self, i, j, list):