[Python-3000-checkins] r60631 - python/branches/py3k/Lib/UserString.py

raymond.hettinger python-3000-checkins at python.org
Wed Feb 6 23:14:56 CET 2008


Author: raymond.hettinger
Date: Wed Feb  6 23:14:55 2008
New Revision: 60631

Modified:
   python/branches/py3k/Lib/UserString.py
Log:
MutableSequence requires an insert() method.

Modified: python/branches/py3k/Lib/UserString.py
==============================================================================
--- python/branches/py3k/Lib/UserString.py	(original)
+++ python/branches/py3k/Lib/UserString.py	Wed Feb  6 23:14:55 2008
@@ -232,6 +232,8 @@
     def __imul__(self, n):
         self.data *= n
         return self
+    def insert(self, index, value):
+        self[index:index] = value
 
 collections.MutableSequence.register(MutableString)
 


More information about the Python-3000-checkins mailing list