def do_format(value, *args, **kwargs):
 if (args and kwargs):
  raise FilterArgumentError("can't handle positional and keyword arguments at the same time")
 return (soft_unicode(value) % (kwargs or args))

def do_format ( value , * args , ** kwargs ) : if ( args and kwargs ) : raise FilterArgumentError ( "can't handle positional and keyword arguments at the same time" ) return ( soft_unicode ( value ) % ( kwargs or args ) )
apply python string formatting on an object: .