summaryrefslogtreecommitdiffstats
path: root/Doc/lib/emailutil.tex
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-10-22 20:53:45 (GMT)
committerBarry Warsaw <barry@python.org>2001-10-22 20:53:45 (GMT)
commitd05e051aa7a43e23b214b43cb83e335d12ab3f39 (patch)
tree70d0ee27c7fb4a42a1d632aa73242bc09de5ef32 /Doc/lib/emailutil.tex
parentd7c3652aa73fefcb60c46b855244d81d4f684f19 (diff)
downloadcpython-d05e051aa7a43e23b214b43cb83e335d12ab3f39.zip
cpython-d05e051aa7a43e23b214b43cb83e335d12ab3f39.tar.gz
cpython-d05e051aa7a43e23b214b43cb83e335d12ab3f39.tar.bz2
Fixed an example in the use of email.Utils.getaddresses(). The
failobj has to be a list or the `+' can fail.
Diffstat (limited to 'Doc/lib/emailutil.tex')
-rw-r--r--Doc/lib/emailutil.tex8
1 files 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}