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
ae12f5d4
Commit
ae12f5d4
authored
Jan 12, 2018
by
yahya-abou-imran
Committed by
INADA Naoki
Jan 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
parent
05565ed2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Lib/abc.py
Lib/abc.py
+3
-1
Misc/NEWS.d/next/Library/2018-01-10-20-37-59.bpo-32473.mP_yJG.rst
...S.d/next/Library/2018-01-10-20-37-59.bpo-32473.mP_yJG.rst
+1
-0
No files found.
Lib/abc.py
View file @
ae12f5d4
...
...
@@ -170,9 +170,11 @@ class ABCMeta(type):
"""Debug helper to print the ABC registry."""
print
(
"Class: %s.%s"
%
(
cls
.
__module__
,
cls
.
__qualname__
),
file
=
file
)
print
(
"Inv.counter: %s"
%
ABCMeta
.
_abc_invalidation_counter
,
file
=
file
)
for
name
in
sorted
(
cls
.
__dict__
.
keys
())
:
for
name
in
cls
.
__dict__
:
if
name
.
startswith
(
"_abc_"
):
value
=
getattr
(
cls
,
name
)
if
isinstance
(
value
,
WeakSet
):
value
=
set
(
value
)
print
(
"%s: %r"
%
(
name
,
value
),
file
=
file
)
def
__instancecheck__
(
cls
,
instance
):
...
...
Misc/NEWS.d/next/Library/2018-01-10-20-37-59.bpo-32473.mP_yJG.rst
0 → 100644
View file @
ae12f5d4
Improve ABCMeta._dump_registry() output readability
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