twisted.words.protocols.jabber.jid.JID(object)
class documentationtwisted.words.protocols.jabber.jid
(View In Hierarchy)
Represents a stringprep'd Jabber ID.
JID objects are hashable so they can be used in sets and as keys in dictionaries.
Method | __init__ | Undocumented |
Method | userhost | Extract the bare JID as a unicode string. |
Method | userhostJID | Extract the bare JID. |
Method | full | Return the string representation of this JID. |
Method | __eq__ | Equality comparison. |
Method | __ne__ | Inequality comparison. |
Method | __hash__ | Calculate hash. |
Method | __unicode__ | Get unicode representation. |
Method | __repr__ | Get object representation. |
Extract the bare JID as a unicode string.
A bare JID does not have a resource part, so this returns either
user@host
or just host
.
Returns | (type: unicode ) |
Extract the bare JID.
A bare JID does not have a resource part, so this returns a JID
object representing either user@host
or just
host
.
If the object this method is called upon doesn't have a resource set, it
will return itself. Otherwise, the bare JID object will be created,
interned using internJID
.
Returns | (type: JID ) |
Equality comparison.
JID
s
compare equal if their user, host and resource parts all compare equal.
When comparing against instances of other types, it uses the default
comparison.
Inequality comparison.
This negates __eq__
for comparison with JIDs and uses the default comparison for other
types.
Get unicode representation.
Return the string representation of this JID as a unicode string.
See Also | full |