mirror of
https://github.com/python/cpython
synced 2024-09-15 21:30:15 +00:00
No need to register classes that already inherit from ABCs.
This commit is contained in:
parent
0dd1b63746
commit
1021cc692d
|
@ -71,5 +71,3 @@ def extend(self, other):
|
|||
self.data.extend(other.data)
|
||||
else:
|
||||
self.data.extend(other)
|
||||
|
||||
collections.MutableSequence.register(UserList)
|
||||
|
|
|
@ -235,8 +235,6 @@ def __imul__(self, n):
|
|||
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
|
||||
|
|
|
@ -160,8 +160,6 @@ def fromkeys(cls, iterable, value=None):
|
|||
d[key] = value
|
||||
return d
|
||||
|
||||
MutableMapping.register(UserDict)
|
||||
|
||||
|
||||
|
||||
################################################################################
|
||||
|
|
|
@ -194,7 +194,6 @@ def values(self):
|
|||
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 @@ def update(self, dict=None, **kwargs):
|
|||
d[ref(key, self._remove)] = value
|
||||
if len(kwargs):
|
||||
self.update(kwargs)
|
||||
|
||||
collections.MutableMapping.register(WeakKeyDictionary)
|
||||
|
|
Loading…
Reference in a new issue