diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-06 20:59:41 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-06 20:59:41 (GMT) |
commit | b8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9 (patch) | |
tree | 34c2987c75b0f7e4bc66164be8c42da928467b74 /Lib/UserList.py | |
parent | 8284c4a7fb27efd55323513572e247a895a35ae1 (diff) | |
download | cpython-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.py | 6 |
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) |