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
b82c8e5b
Commit
b82c8e5b
authored
Nov 04, 2010
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
classic classes are gone; whoppie!
parent
83473288
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
13 deletions
+1
-13
Lib/inspect.py
Lib/inspect.py
+1
-13
No files found.
Lib/inspect.py
View file @
b82c8e5b
...
@@ -338,22 +338,10 @@ def classify_class_attrs(cls):
...
@@ -338,22 +338,10 @@ def classify_class_attrs(cls):
return
result
return
result
# ----------------------------------------------------------- class helpers
# ----------------------------------------------------------- class helpers
def
_searchbases
(
cls
,
accum
):
# Simulate the "classic class" search order.
if
cls
in
accum
:
return
accum
.
append
(
cls
)
for
base
in
cls
.
__bases__
:
_searchbases
(
base
,
accum
)
def
getmro
(
cls
):
def
getmro
(
cls
):
"Return tuple of base classes (including cls) in method resolution order."
"Return tuple of base classes (including cls) in method resolution order."
if
hasattr
(
cls
,
"__mro__"
):
return
cls
.
__mro__
return
cls
.
__mro__
else
:
result
=
[]
_searchbases
(
cls
,
result
)
return
tuple
(
result
)
# -------------------------------------------------- source code extraction
# -------------------------------------------------- source code extraction
def
indentsize
(
line
):
def
indentsize
(
line
):
...
...
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