def _format_jid(local=None, domain=None, resource=None):
 result = []
 if local:
  result.append(local)
  result.append(u'@')
 if domain:
  result.append(domain)
 if resource:
  result.append(u'/')
  result.append(resource)
 return u''.join(result)

def _format_jid ( local = None , domain = None , resource = None ) : result = [ ] if local : result . append ( local ) result . append ( u'@' ) if domain : result . append ( domain ) if resource : result . append ( u'/' ) result . append ( resource ) return u'' . join ( result )
format the given jid components into a full or bare jid .