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_name
of the group. If it isNone
and there is exactly oneAddress
inaddresses
, then theGroup
represents a single address that is not in a group.
-
addresses
-
A possibly empty tuple of
Address
objects representing the addresses in the group.
-
__str__()
-
The
str
value of aGroup
is formatted according to RFC 5322, but with no Content Transfer Encoding of any non-ASCII characters. Ifdisplay_name
is none and there is a singleAddress
in theaddresses
list, thestr
value will be the same as thestr
of that singleAddress
.
Please login to continue.