def _parse_jid(data):
 match = JID_PATTERN.match(data)
 if (not match):
  raise InvalidJID(u'JID could not be parsed')
 (node, domain, resource) = match.groups()
 node = _validate_node(node)
 domain = _validate_domain(domain)
 resource = _validate_resource(resource)
 return (node, domain, resource)

def _parse_jid ( data ) : match = JID_PATTERN . match ( data ) if ( not match ) : raise InvalidJID ( u'JID could not be parsed' ) ( node , domain , resource ) = match . groups ( ) node = _validate_node ( node ) domain = _validate_domain ( domain ) resource = _validate_resource ( resource ) return ( node , domain , resource )
parse string data into the node .