def __init__(self, jid=None, node='', domain='', resource=''):
        if not jid and not domain: raise ValueError('JID must contain at least domain name')
        elif type(jid)==type(self): self.node,self.domain,self.resource=jid.node,jid.domain,jid.resource
        elif domain: self.node,self.domain,self.resource=node,domain,resource
        else:
            if jid.find('@')+1: self.node,jid=jid.split('@',1)
            else: self.node=''
            if jid.find('/')+1: self.domain,self.resource=jid.split('/',1)
            else: self.domain,self.resource=jid,''
Constructor. JID can be specified as string (jid argument) or as separate parts.
dataset/ETHPy150Open CouchPotato/CouchPotatoServer/libs/xmpp/protocol.py/JID.__init__