diff options
author | Raymond Hettinger <python@rcn.com> | 2008-02-06 22:14:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-02-06 22:14:55 (GMT) |
commit | 6cc14a05d203868b84418a06d6c8254a4470e448 (patch) | |
tree | 9614ffdd32bcb21fbd511a0b3e6e25513bad69f0 /Lib | |
parent | b8b6d3ef40a355cb7e6256d3e3eb4edd904b05c9 (diff) | |
download | cpython-6cc14a05d203868b84418a06d6c8254a4470e448.zip cpython-6cc14a05d203868b84418a06d6c8254a4470e448.tar.gz cpython-6cc14a05d203868b84418a06d6c8254a4470e448.tar.bz2 |
MutableSequence requires an insert() method.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/UserString.py | 2 |
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) |