From: Barry Warsaw Date: Mon, 22 Oct 2001 20:53:45 +0000 (+0000) Subject: Fixed an example in the use of email.Utils.getaddresses(). The X-Git-Tag: v2.2.1c1~1104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d05e051aa7a43e23b214b43cb83e335d12ab3f39;p=python Fixed an example in the use of email.Utils.getaddresses(). The failobj has to be a list or the `+' can fail. --- diff --git a/Doc/lib/emailutil.tex b/Doc/lib/emailutil.tex index d4a7313d91..a5030d21b5 100644 --- a/Doc/lib/emailutil.tex +++ b/Doc/lib/emailutil.tex @@ -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}