Fix a number of bugs and omissions in the AddressList documentation, most

noted by Steve Holden.


This closes SF bug #413876.
This commit is contained in:
Fred Drake 2001-04-09 15:42:56 +00:00
parent 17a781bc69
commit 9c846366ee
1 changed files with 23 additions and 10 deletions

View File

@ -238,24 +238,36 @@ be used to read the message content.
An \class{AddressList} instance has the following methods: An \class{AddressList} instance has the following methods:
\begin{methoddesc}{__len__}{name} \begin{methoddesc}{__len__}{}
Return the number of addresses in the address list. Return the number of addresses in the address list.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}{__str__}{name} \begin{methoddesc}{__str__}{}
Return a canonicalized string representation of the address list. Return a canonicalized string representation of the address list.
Addresses are rendered in "name" <host@domain> form, comma-separated. Addresses are rendered in "name" <host@domain> form, comma-separated.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}{__add__}{name} \begin{methoddesc}{__add__}{alist}
Return an \class{AddressList} instance that contains all addresses in Return a new \class{AddressList} instance that contains all addresses
both \class{AddressList} operands, with duplicates removed (set union). in both \class{AddressList} operands, with duplicates removed (set
union).
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}{__sub__}{name} \begin{methoddesc}{__iadd__}{alist}
Return an \class{AddressList} instance that contains every address in the In-place version of \method{__add__()}; turns this \class{AddressList}
left-hand \class{AddressList} operand that is not present in the right-hand instance into the union of itself and the right-hand instance,
address operand (set difference). \var{alist}.
\end{methoddesc}
\begin{methoddesc}{__sub__}{alist}
Return a new \class{AddressList} instance that contains every address
in the left-hand \class{AddressList} operand that is not present in
the right-hand address operand (set difference).
\end{methoddesc}
\begin{methoddesc}{__isub__}{alist}
In-place version of \method{__sub__()}, removing addresses in this
list which are also in \var{alist}.
\end{methoddesc} \end{methoddesc}
@ -264,5 +276,6 @@ Finally, \class{AddressList} instances have one public instance variable:
\begin{memberdesc}{addresslist} \begin{memberdesc}{addresslist}
A list of tuple string pairs, one per address. In each member, the A list of tuple string pairs, one per address. In each member, the
first is the canonicalized name part, the second is the first is the canonicalized name part, the second is the
actual route-address (@-separated username-host.domain pair). actual route-address (\character{@}-separated username-host.domain
pair).
\end{memberdesc} \end{memberdesc}