#NEWLINE# def addStudent( self , name , age ) : #NEWLINE# #INDENT# new_names = self . getNames ( ) #NEWLINE# found = False #NEWLINE# for item in new_names : #NEWLINE# #INDENT# if ( item == ( name , age ) ) : #NEWLINE# #INDENT# found = True #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# if ( not found ) : #NEWLINE# #INDENT# new_names . append ( ( name , age ) ) #NEWLINE# #UNINDENT# new_names . sort ( ) #NEWLINE# while len ( self . children ) : #NEWLINE# #INDENT# self . remove ( self . children [ 0 ] ) #NEWLINE# #UNINDENT# self . addTitle ( ) #NEWLINE# for student in self : #NEWLINE# #INDENT# sw = StudentWidget ( student [ 0 ] , student [ 1 ] ) #NEWLINE# makeDraggable ( sw ) #NEWLINE# self . append ( sw ) #NEWLINE# self . setCellVerticalAlignment ( sw , HasVerticalAlignment . ALIGN_TOP )