mirror of https://github.com/python/cpython.git
Fixed an example in the use of email.Utils.getaddresses(). The
failobj has to be a list or the `+' can fail.
This commit is contained in:
parent
d7c3652aa7
commit
d05e051aa7
|
@ -40,10 +40,10 @@ simple example that gets all the recipients of a message:
|
|||
\begin{verbatim}
|
||||
from email.Utils import getaddresses
|
||||
|
||||
tos = msg.get_all('to')
|
||||
ccs = msg.get_all('cc')
|
||||
resent_tos = msg.get_all('resent-to')
|
||||
resent_ccs = msg.get_all('resent-cc')
|
||||
tos = msg.get_all('to', [])
|
||||
ccs = msg.get_all('cc', [])
|
||||
resent_tos = msg.get_all('resent-to', [])
|
||||
resent_ccs = msg.get_all('resent-cc', [])
|
||||
all_recipients = getaddresses(tos + ccs + resent_tos + resent_ccs)
|
||||
\end{verbatim}
|
||||
\end{funcdesc}
|
||||
|
|
Loading…
Reference in New Issue