#NEWLINE# def test_typed( ) : #NEWLINE# #INDENT# class A ( Basic ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# class B ( Basic ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# rmzeros = rm_id ( ( lambda x : ( x == 0 ) ) ) #NEWLINE# rmones = rm_id ( ( lambda x : ( x == 1 ) ) ) #NEWLINE# remove_something = typed ( { #NEWLINE# #INDENT# A : rmzeros , #NEWLINE# B : rmones , #NEWLINE# #UNINDENT# } ) #NEWLINE# assert ( remove_something ( A ( 0 , 1 ) ) == A ( 1 ) ) #NEWLINE# assert ( remove_something ( B ( 0 , 1 ) ) == B ( 0 ) )