#NEWLINE# @ expose ( 'format' ) #NEWLINE# @ jit . look_inside_iff ( ( lambda args : jit . isconstant ( args [ 0 ] ) ) ) #NEWLINE# def do_format( args ) : #NEWLINE# #INDENT# if ( len ( args ) == 0 ) : #NEWLINE# #INDENT# raise SchemeException ( 'format: expects format string' ) #NEWLINE# #UNINDENT# fmt = args [ 0 ] #NEWLINE# if ( not isinstance ( fmt , values_string . W_String ) ) : #NEWLINE# #INDENT# raise SchemeException ( 'format: expected a format string, got something else' ) #NEWLINE# #UNINDENT# vals = args [ 1 : ] #NEWLINE# return values_string . W_String . fromstr_utf8 ( format ( fmt , vals , 'format' ) )