def build_or_str(elements, str_format=None):
 if (not elements):
  return ''
 if (not isinstance(elements, six.string_types)):
  elements = _(' or ').join(elements)
 if str_format:
  return (str_format % elements)
 return elements

def build_or_str ( elements , str_format = None ) : if ( not elements ) : return '' if ( not isinstance ( elements , six . string_types ) ) : elements = _ ( ' or ' ) . join ( elements ) if str_format : return ( str_format % elements ) return elements
builds a string of elements joined by or .