Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ddcf442a
Commit
ddcf442a
authored
Feb 11, 2008
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need to register classes that already inherit from ABCs.
parent
adfda0f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
9 deletions
+0
-9
Lib/UserList.py
Lib/UserList.py
+0
-2
Lib/UserString.py
Lib/UserString.py
+0
-2
Lib/collections.py
Lib/collections.py
+0
-2
Lib/weakref.py
Lib/weakref.py
+0
-3
No files found.
Lib/UserList.py
View file @
ddcf442a
...
@@ -71,5 +71,3 @@ class UserList(collections.MutableSequence):
...
@@ -71,5 +71,3 @@ class UserList(collections.MutableSequence):
self
.
data
.
extend
(
other
.
data
)
self
.
data
.
extend
(
other
.
data
)
else
:
else
:
self
.
data
.
extend
(
other
)
self
.
data
.
extend
(
other
)
collections
.
MutableSequence
.
register
(
UserList
)
Lib/UserString.py
View file @
ddcf442a
...
@@ -235,8 +235,6 @@ class MutableString(UserString, collections.MutableSequence):
...
@@ -235,8 +235,6 @@ class MutableString(UserString, collections.MutableSequence):
def
insert
(
self
,
index
,
value
):
def
insert
(
self
,
index
,
value
):
self
[
index
:
index
]
=
value
self
[
index
:
index
]
=
value
collections
.
MutableSequence
.
register
(
MutableString
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
# execute the regression test to stdout, if called as a script:
# execute the regression test to stdout, if called as a script:
import
os
import
os
...
...
Lib/collections.py
View file @
ddcf442a
...
@@ -160,8 +160,6 @@ class UserDict(MutableMapping):
...
@@ -160,8 +160,6 @@ class UserDict(MutableMapping):
d
[
key
]
=
value
d
[
key
]
=
value
return
d
return
d
MutableMapping
.
register
(
UserDict
)
################################################################################
################################################################################
...
...
Lib/weakref.py
View file @
ddcf442a
...
@@ -194,7 +194,6 @@ class WeakValueDictionary(collections.MutableMapping):
...
@@ -194,7 +194,6 @@ class WeakValueDictionary(collections.MutableMapping):
L
.
append
(
o
)
L
.
append
(
o
)
return
L
return
L
collections
.
MutableMapping
.
register
(
WeakValueDictionary
)
class
KeyedRef
(
ref
):
class
KeyedRef
(
ref
):
"""Specialized reference that includes a key corresponding to the value.
"""Specialized reference that includes a key corresponding to the value.
...
@@ -350,5 +349,3 @@ class WeakKeyDictionary(collections.MutableMapping):
...
@@ -350,5 +349,3 @@ class WeakKeyDictionary(collections.MutableMapping):
d
[
ref
(
key
,
self
.
_remove
)]
=
value
d
[
ref
(
key
,
self
.
_remove
)]
=
value
if
len
(
kwargs
):
if
len
(
kwargs
):
self
.
update
(
kwargs
)
self
.
update
(
kwargs
)
collections
.
MutableMapping
.
register
(
WeakKeyDictionary
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment