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`.`mail`.`alias`.`AliasGroup``

class documentation

`class AliasGroup(AliasBase): (source)`

Implements interfaces: `twisted.mail.interfaces.IAlias`

View In Hierarchy

An alias which points to multiple destination aliases.

Method | `__init__` | Create a group of aliases.
Method | `__len__` | Return the number of aliases in the group.
Method | `__str__` | Build a string representation of this `AliasGroup` instance.
Method | `createMessageReceiver` | Create a message receiver for each alias and return a message receiver which will pass on a message to each of those.
Method | `resolve` | Map each of the aliases in the group to its ultimate destination.
Instance Variable | `aliases` | The destination aliases.
Instance Variable | `processAliasFactory` | A factory for process aliases.

Inherited from `AliasBase`:

Method | `domain` | Return the domain associated with original address.
Instance Variable | `domains` | See `__init__`.
Instance Variable | `original` | The original address being aliased.

def __init__(self, items, *args): (source)
overrides `twisted.mail.alias.AliasBase.__init__`

Create a group of aliases.

Parse a list of alias strings and, for each, create an appropriate alias object.

Parameters
items:`list` of `bytes` | Aliases.
*args:n-`tuple` of (0) `dict` mapping `bytes` to `IDomain` provider, (1) `bytes` | Arguments for `AliasBase.__init__`.

def __len__(self): (source)

Return the number of aliases in the group.

Returns
`int` | The number of aliases in the group.

def __str__(self): (source)

Build a string representation of this `AliasGroup` instance.

Returns
`bytes` | A string containing the aliases in the group.

def createMessageReceiver(self): (source)
from `twisted.mail.interfaces.IAlias`

Create a message receiver for each alias and return a message receiver which will pass on a message to each of those.

Returns
`MultiWrapper` | A message receiver which passes a message on to message receivers for each alias in the group.

def resolve(self, aliasmap, memo=None): (source)
overrides `twisted.mail.alias.AliasBase.resolve`

Map each of the aliases in the group to its ultimate destination.

Parameters
aliasmap:`dict` mapping `bytes` to `AliasBase` | A mapping of username to alias or group of aliases.
memo:`None` or `dict` of `AliasBase` | A record of the aliases already considered in the resolution process. If provided, `memo` is modified to include this alias.
Returns
`MultiWrapper` | A message receiver which passes the message on to message receivers for the ultimate destination of each alias in the group.

aliases: `list` of `AliasBase` which implements `IAlias` = (source)

The destination aliases.

processAliasFactory: no-argument callable which returns `ProcessAlias` = (source)

A factory for process aliases.