#NEWLINE# def _validate_compatible( from_schema , to_schema ) : #NEWLINE# #INDENT# if ( set ( from_schema . names ) != set ( to_schema . names ) ) : #NEWLINE# #INDENT# raise com . IbisInputError ( 'Schemas have different names' ) #NEWLINE# #UNINDENT# for name in from_schema : #NEWLINE# #INDENT# lt = from_schema [ name ] #NEWLINE# rt = to_schema [ name ] #NEWLINE# if ( not rt . can_implicit_cast ( lt ) ) : #NEWLINE# #INDENT# raise com . IbisInputError ( 'Cannot safely cast {0!r} to {1!r}' . format ( lt , rt ) )