summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-11-04 00:38:49 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-11-04 00:38:49 (GMT)
commitb82c8e5b27a8d8ec441aeab5d01d6d9bd8e6d7ef (patch)
treecb10d333b0d7a9dee1551f4221da4beb2a567899 /Lib/inspect.py
parent83473288a8201f327ff11d5cfef5e3035fefda4f (diff)
downloadcpython-b82c8e5b27a8d8ec441aeab5d01d6d9bd8e6d7ef.zip
cpython-b82c8e5b27a8d8ec441aeab5d01d6d9bd8e6d7ef.tar.gz
cpython-b82c8e5b27a8d8ec441aeab5d01d6d9bd8e6d7ef.tar.bz2
classic classes are gone; whoppie!
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 35bc263..5f92787 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -338,22 +338,10 @@ def classify_class_attrs(cls):
return result
# ----------------------------------------------------------- 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):
"Return tuple of base classes (including cls) in method resolution order."
- if hasattr(cls, "__mro__"):
- return cls.__mro__
- else:
- result = []
- _searchbases(cls, result)
- return tuple(result)
+ return cls.__mro__
# -------------------------------------------------- source code extraction
def indentsize(line):