summaryrefslogtreecommitdiffstats
path: root/Lib/UserList.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-02-06 20:59:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-02-06 20:59:41 (GMT)
commitb8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9 (patch)
tree34c2987c75b0f7e4bc66164be8c42da928467b74 /Lib/UserList.py
parent8284c4a7fb27efd55323513572e247a895a35ae1 (diff)
downloadcpython-b8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9.zip
cpython-b8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9.tar.gz
cpython-b8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9.tar.bz2
Let the world know that UserList is a MutableSequence.
Diffstat (limited to 'Lib/UserList.py')
-rw-r--r--Lib/UserList.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/UserList.py b/Lib/UserList.py
index 116122f..348ea76 100644
--- a/Lib/UserList.py
+++ b/Lib/UserList.py
@@ -1,6 +1,8 @@
"""A more or less complete user-defined wrapper around list objects."""
-class UserList:
+import collections
+
+class UserList(collections.MutableSequence):
def __init__(self, initlist=None):
self.data = []
if initlist is not None:
@@ -69,3 +71,5 @@ class UserList:
self.data.extend(other.data)
else:
self.data.extend(other)
+
+collections.MutableSequence.register(UserList)