parameters: (obj_class)
return_statement: return mro
docstring: Get a reasonable method resolution order of a class and its superclasses
      for both old-style and new-style classes.
docstring_summary: Get a reasonable method resolution order of a class and its superclasses
      for both old-style and new-style classes.
docstring_tokens: Get a reasonable method resolution order of a class and its superclasses for both old - style and new - style classes .
function: def _get_mro(obj_class):
      """ Get a reasonable method resolution order of a class and its superclasses
      for both old-style and new-style classes.
      """
      if not hasattr(obj_class, '__mro__'):
          # Old-style class. Mix in object to make a fake new-style class.
          try:
              obj_class = type(obj_class.__name__, (obj_class, object), {})
          except TypeError:
              # Old-style extension type that does not descend from object.
              # FIXME: try to construct a more thorough MRO.
              mro = [obj_class]
          else:
              mro = obj_class.__mro__[1:-1]
      else:
          mro = obj_class.__mro__
      return mro
function_tokens: def _get_mro ( obj_class ) : if not hasattr ( obj_class , '__mro__' ) : # Old-style class. Mix in object to make a fake new-style class. try : obj_class = type ( obj_class . __name__ , ( obj_class , object ) , { } ) except TypeError : # Old-style extension type that does not descend from object. # FIXME: try to construct a more thorough MRO. mro = [ obj_class ] else : mro = obj_class . __mro__ [ 1 : - 1 ] else : mro = obj_class . __mro__ return mro