Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`words`.`protocols`.`jabber`.`jid`.`JID``

class documentation

`class JID: (source)`

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 | `__eq__` | Equality comparison.
Method | `__hash__` | Calculate hash.
Method | `__init__` | Undocumented
Method | `__repr__` | Get object representation.
Method | `__unicode__` | Get unicode representation.
Method | `full` | Return the string representation of this JID.
Method | `userhost` | Extract the bare JID as a unicode string.
Method | `userhostJID` | Extract the bare JID.
Instance Variable | `host` | Undocumented
Instance Variable | `resource` | Undocumented
Instance Variable | `user` | Undocumented

def __eq__(self, other): (source)

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.

Parameters
other:`object` | Undocumented
Returns
`bool` | Undocumented

def __hash__(self): (source)

Calculate hash.

`JID`s with identical constituent user, host and resource parts have equal hash values. In combination with the comparison defined on JIDs, this allows for using `JID`s in sets and as dictionary keys.

def __init__(self, str=None, tuple=None): (source)

Undocumented

def __repr__(self): (source)

Get object representation.

Returns a string that would create a new JID object that compares equal to this one.

Returns
`str` | Undocumented

def __unicode__(self): (source)

Get unicode representation.

Return the string representation of this JID as a unicode string.

See Also
`full`

def full(self): (source)

Return the string representation of this JID.

Returns
`str` | Undocumented

def userhost(self): (source)

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
`str` | Undocumented

def userhostJID(self): (source)

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
`JID` | Undocumented

host = (source)

Undocumented

resource = (source)

Undocumented

user = (source)

Undocumented