@evalcontextfilter
def do_join(eval_ctx, value, d=u''):
 if (not eval_ctx.autoescape):
  return unicode(d).join(imap(unicode, value))
 if (not hasattr(d, '__html__')):
  value = list(value)
  do_escape = False
  for (idx, item) in enumerate(value):
   if hasattr(item, '__html__'):
    do_escape = True
   else:
    value[idx] = unicode(item)
  if do_escape:
   d = escape(d)
  else:
   d = unicode(d)
  return d.join(value)
 return soft_unicode(d).join(imap(soft_unicode, value))

@ evalcontextfilter def do_join ( eval_ctx , value , d = u'' ) : if ( not eval_ctx . autoescape ) : return unicode ( d ) . join ( imap ( unicode , value ) ) if ( not hasattr ( d , '__html__' ) ) : value = list ( value ) do_escape = False for ( idx , item ) in enumerate ( value ) : if hasattr ( item , '__html__' ) : do_escape = True else : value [ idx ] = unicode ( item ) if do_escape : d = escape ( d ) else : d = unicode ( d ) return d . join ( value ) return soft_unicode ( d ) . join ( imap ( soft_unicode , value ) )
return a string which is the concatenation of the strings in the sequence .