]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
No need to register classes that already inherit from ABCs.
authorRaymond Hettinger <python@rcn.com>
Mon, 11 Feb 2008 19:00:13 +0000 (19:00 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 11 Feb 2008 19:00:13 +0000 (19:00 +0000)
Lib/UserList.py
Lib/UserString.py
Lib/collections.py
Lib/weakref.py

index 348ea76cdba632da9a25d4721bdff732235a5bd0..7617a085bfb59bf0f53646081150ebeb928d997a 100644 (file)
@@ -71,5 +71,3 @@ class UserList(collections.MutableSequence):
             self.data.extend(other.data)
         else:
             self.data.extend(other)
-
-collections.MutableSequence.register(UserList)
index c3267ad73331496e88e7205056b30967b08e512e..27b2b53d5a66ea50a0192d7003926cd977deab2a 100755 (executable)
@@ -235,8 +235,6 @@ class MutableString(UserString, collections.MutableSequence):
     def insert(self, index, value):
         self[index:index] = value
 
-collections.MutableSequence.register(MutableString)
-
 if __name__ == "__main__":
     # execute the regression test to stdout, if called as a script:
     import os
index d06445bcaa1b452517fccbfd2e0eaabec51f9a1a..abde718d752de132119fbd26cbd830e96b1a6b12 100644 (file)
@@ -160,8 +160,6 @@ class UserDict(MutableMapping):
             d[key] = value
         return d
 
-MutableMapping.register(UserDict)
-
 
 
 ################################################################################
index b2546f72234dbe81198649a0d71ad8a174d64f8d..6c479a41ac02f98a5b23ddcf2007e9a098c98201 100644 (file)
@@ -194,7 +194,6 @@ class WeakValueDictionary(collections.MutableMapping):
                 L.append(o)
         return L
 
-collections.MutableMapping.register(WeakValueDictionary)
 
 class KeyedRef(ref):
     """Specialized reference that includes a key corresponding to the value.
@@ -350,5 +349,3 @@ class WeakKeyDictionary(collections.MutableMapping):
                 d[ref(key, self._remove)] = value
         if len(kwargs):
             self.update(kwargs)
-
-collections.MutableMapping.register(WeakKeyDictionary)