#NEWLINE# def _flags_changed( self , name , old , new ) : #NEWLINE# #INDENT# 'ensure flags dict is valid' #NEWLINE# for ( key , value ) in new . items ( ) : #NEWLINE# #INDENT# assert ( len ( value ) == 2 ) , ( 'Bad flag: %r:%s' % ( key , value ) ) #NEWLINE# assert isinstance ( value [ 0 ] , ( dict , Config ) ) , ( 'Bad flag: %r:%s' % ( key , value ) ) #NEWLINE# assert isinstance ( value [ 1 ] , str ) , ( 'Bad flag: %r:%s' % ( key , value ) )