diff options
author | Guido van Rossum <guido@python.org> | 1998-12-09 22:15:01 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-12-09 22:15:01 (GMT) |
commit | f8b3b944aa748be7689109c353e990e8a25c684f (patch) | |
tree | ffeb14fdb214aff93f1eed7eff098aa04e9ab67f /Lib | |
parent | 9819e4c5cf30958c1aba859c6685ab982bcfe28f (diff) | |
download | cpython-f8b3b944aa748be7689109c353e990e8a25c684f.zip cpython-f8b3b944aa748be7689109c353e990e8a25c684f.tar.gz cpython-f8b3b944aa748be7689109c353e990e8a25c684f.tar.bz2 |
In __getslice__, use self.__class__ instead of UserList.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/UserList.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/UserList.py b/Lib/UserList.py index 5dfd182..1d5065f 100644 --- a/Lib/UserList.py +++ b/Lib/UserList.py @@ -19,7 +19,7 @@ class UserList: 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): |