Merge r60628, r60631, and r60633. Register UserList and UserString will the appropriate ABCs.

This commit is contained in:
Raymond Hettinger 2008-02-07 03:25:46 +00:00
parent 017b6a3ad2
commit 882a416900
3 changed files with 14 additions and 45 deletions

View file

@ -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:
@ -83,3 +85,5 @@ class UserList:
self.data.extend(other.data)
else:
self.data.extend(other)
collections.MutableSequence.register(UserList)