#NEWLINE# def validate( self , x ) : #NEWLINE# #INDENT# if ( not isinstance ( x , tuple ) ) : #NEWLINE# #INDENT# raise SchemaError ( 'Expecting tuple, got {}' . format ( type ( x ) ) , [ ] ) #NEWLINE# #UNINDENT# if ( len ( x ) != self . N ) : #NEWLINE# #INDENT# raise SchemaError ( 'Expecting a tuple of size {}, but got' . format ( schema . N , len ( x ) ) , [ ] ) #NEWLINE# #UNINDENT# return tuple ( ( schema . validate ( y ) for ( y , schema ) in zip ( x , self . tt ) ) )