#NEWLINE# def walktree( classes , children , parent ) : #NEWLINE# #INDENT# 'Recursive helper function for getclasstree().' #NEWLINE# results = [ ] #NEWLINE# classes . sort ( key = attrgetter ( '__module__' , '__name__' ) ) #NEWLINE# for c in classes : #NEWLINE# #INDENT# results . append ( ( c , c . __bases__ ) ) #NEWLINE# if ( c in children ) : #NEWLINE# #INDENT# results . append ( walktree ( children [ c ] , children , c ) ) #NEWLINE# #UNINDENT# #UNINDENT# return results