From b82c8e5b27a8d8ec441aeab5d01d6d9bd8e6d7ef Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 4 Nov 2010 00:38:49 +0000 Subject: [PATCH] classic classes are gone; whoppie! --- Lib/inspect.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/Lib/inspect.py b/Lib/inspect.py index 35bc263cad7..5f927873a7a 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):