#NEWLINE# def _get_mro( obj_class ) : #NEWLINE# #INDENT# ' Get a reasonable method resolution order of a class and its superclasses\n    for both old-style and new-style classes.\n    ' #NEWLINE# if ( not hasattr ( obj_class , '__mro__' ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# obj_class = type ( obj_class . __name__ , ( obj_class , object ) , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# mro = [ obj_class ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# mro = obj_class . __mro__ [ 1 : ( - 1 ) ] #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# mro = obj_class . __mro__ #NEWLINE# #UNINDENT# return mro