MutableSequence requires an insert() method.

This commit is contained in:
Raymond Hettinger 2008-02-06 22:14:55 +00:00
parent b8b6d3ef40
commit 6cc14a05d2
1 changed files with 2 additions and 0 deletions

View File

@ -232,6 +232,8 @@ class MutableString(UserString, collections.MutableSequence):
def __imul__(self, n):
self.data *= n
return self
def insert(self, index, value):
self[index:index] = value
collections.MutableSequence.register(MutableString)