def _number_format(val, dec):
 return ((dec and ((('%.' + str(dec)) + 'f') % val)) or int(round(val)))

def _number_format ( val , dec ) : return ( ( dec and ( ( ( '%.' + str ( dec ) ) + 'f' ) % val ) ) or int ( round ( val ) ) )
return float with dec decimals; if dec is 0 .