From d05e051aa7a43e23b214b43cb83e335d12ab3f39 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Mon, 22 Oct 2001 20:53:45 +0000 Subject: Fixed an example in the use of email.Utils.getaddresses(). The failobj has to be a list or the `+' can fail. --- Doc/lib/emailutil.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/lib/emailutil.tex b/Doc/lib/emailutil.tex index d4a7313..a5030d2 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} -- cgit v0.12