def printf_format_for_type(t, types):
 description = type_description(t, types)
 if ('struct' in description):
  specifer = printf_format_for_struct(t, types)
 else:
  specifer = description['printf_specifier']
 return specifer.replace('"', '\\"')

def printf_format_for_type ( t , types ) : description = type_description ( t , types ) if ( 'struct' in description ) : specifer = printf_format_for_struct ( t , types ) else : specifer = description [ 'printf_specifier' ] return specifer . replace ( '"' , '\\"' )
returns a format string for printing the given type .