Commit b82c8e5b authored by Benjamin Peterson's avatar Benjamin Peterson

classic classes are gone; whoppie!

parent 83473288
...@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment