def _get_mro(cls):
 if (not isinstance(cls, type)):
  class cls(cls, object, ):
   pass
  return cls.__mro__[1:]
 return cls.__mro__

def _get_mro ( cls ) : if ( not isinstance ( cls , type ) ) : class cls ( cls , object , ) : pass return cls . __mro__ [ 1 : ] return cls . __mro__
get a reasonable method resolution order of a class and its superclasses for both old-style and new-style classes .