class email.headerregistry.Group(display_name=None, addresses=None)
The class used to represent an address group. The general form of an address group is:
display_name: [address-list];
As a convenience for processing lists of addresses that consist of a mixture of groups and single addresses, a Group may also be used to represent single addresses that are not part of a group by setting display_name to None and providing a list of the single address as addresses.
-
display_name -
The
display_nameof the group. If it isNoneand there is exactly oneAddressinaddresses, then theGrouprepresents a single address that is not in a group.
-
addresses -
A possibly empty tuple of
Addressobjects representing the addresses in the group.
-
__str__() -
The
strvalue of aGroupis formatted according to RFC 5322, but with no Content Transfer Encoding of any non-ASCII characters. Ifdisplay_nameis none and there is a singleAddressin theaddresseslist, thestrvalue will be the same as thestrof that singleAddress.
Please login to continue.