summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-02-06 22:14:55 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-02-06 22:14:55 (GMT)
commit6cc14a05d203868b84418a06d6c8254a4470e448 (patch)
tree9614ffdd32bcb21fbd511a0b3e6e25513bad69f0 /Lib
parentb8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9 (diff)
downloadcpython-6cc14a05d203868b84418a06d6c8254a4470e448.zip
cpython-6cc14a05d203868b84418a06d6c8254a4470e448.tar.gz
cpython-6cc14a05d203868b84418a06d6c8254a4470e448.tar.bz2
MutableSequence requires an insert() method.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/UserString.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/UserString.py b/Lib/UserString.py
index 615c135..c3267ad 100755
--- a/Lib/UserString.py
+++ b/Lib/UserString.py
@@ -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)