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`.`python`.`util`.`FancyStrMixin``

class documentation

`class FancyStrMixin: (source)`

Known subclasses: `twisted.names._rfc1982.SerialNumber`, `twisted.names.dns.Record_A6`, `twisted.names.dns.Record_AAAA`, `twisted.names.dns.Record_AFSDB`, `twisted.names.dns.Record_HINFO`, `twisted.names.dns.Record_MINFO`, `twisted.names.dns.Record_MX`, `twisted.names.dns.Record_NAPTR`, `twisted.names.dns.Record_NULL`, `twisted.names.dns.Record_RP`, `twisted.names.dns.Record_SOA`, `twisted.names.dns.Record_SRV`, `twisted.names.dns.Record_SSHFP`, `twisted.names.dns.Record_TSIG`, `twisted.names.dns.Record_TXT`, `twisted.names.dns.Record_WKS`, `twisted.names.dns.SimpleRecord`, `twisted.names.dns.UnknownRecord`, `twisted.pair.tuntap.TunnelAddress`, `twisted.names.dns._OPTHeader`, `twisted.names.dns._OPTVariableOption`

View In Hierarchy

Mixin providing a flexible implementation of `__str__`.

`__str__` output will begin with the name of the class, or the contents of the attribute `fancybasename` if it is set.

The body of `__str__` can be controlled by overriding `showAttributes` in a subclass. Set `showAttributes` to a sequence of strings naming attributes, or sequences of `(attributeName, callable)`, or sequences of `(attributeName, displayName, formatCharacter)`. In the second case, the callable is passed the value of the attribute and its return value used in the output of `__str__`. In the final case, the attribute is looked up using `attributeName`, but the output uses `displayName` instead, and renders the value of the attribute using `formatCharacter`, e.g. `"%.3f"` might be used for a float.

Method | `__str__` | Undocumented
Class Variable | `showAttributes` | Undocumented

def __str__(self): (source)
overridden in `twisted.names._rfc1982.SerialNumber`, `twisted.names.dns.Record_A6`

Undocumented

Returns
`str` | Undocumented

showAttributes: `Sequence[Union[str, Tuple[str, str, str], Tuple[str, Callable]]]` = (source)
overridden in `twisted.names._rfc1982.SerialNumber`, `twisted.names.dns.Record_A6`, `twisted.names.dns.Record_AAAA`, `twisted.names.dns.Record_AFSDB`, `twisted.names.dns.Record_HINFO`, `twisted.names.dns.Record_MINFO`, `twisted.names.dns.Record_MX`, `twisted.names.dns.Record_NAPTR`, `twisted.names.dns.Record_NULL`, `twisted.names.dns.Record_RP`, `twisted.names.dns.Record_SOA`, `twisted.names.dns.Record_SRV`, `twisted.names.dns.Record_SSHFP`, `twisted.names.dns.Record_TSIG`, `twisted.names.dns.Record_TXT`, `twisted.names.dns.Record_WKS`, `twisted.names.dns.SimpleRecord`, `twisted.names.dns.UnknownRecord`, `twisted.pair.tuntap.TunnelAddress`, `twisted.names.dns._OPTHeader`, `twisted.names.dns._OPTVariableOption`

Undocumented