summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-12-30 19:17:37 (GMT)
committerBarry Warsaw <barry@python.org>2002-12-30 19:17:37 (GMT)
commitd1adc8a6af818dddff37735717c4aa6c8c8fcc62 (patch)
tree5aa0ad2b9833075c32e1086d4d9c51c7dcf581cf
parent10ee7a7f15dd9c356c434575ab26c26bafc0112d (diff)
downloadcpython-d1adc8a6af818dddff37735717c4aa6c8c8fcc62.zip
cpython-d1adc8a6af818dddff37735717c4aa6c8c8fcc62.tar.gz
cpython-d1adc8a6af818dddff37735717c4aa6c8c8fcc62.tar.bz2
Describe the new `errors' argument to Header.__init__() and
Header.append()
-rw-r--r--Doc/lib/emailheaders.tex11
1 files changed, 9 insertions, 2 deletions
diff --git a/Doc/lib/emailheaders.tex b/Doc/lib/emailheaders.tex
index 66eb716..8d5964b 100644
--- a/Doc/lib/emailheaders.tex
+++ b/Doc/lib/emailheaders.tex
@@ -48,7 +48,8 @@ embedded ISO-8859-1 character.
Here is the \class{Header} class description:
\begin{classdesc}{Header}{\optional{s\optional{, charset\optional{,
- maxlinelen\optional{, header_name\optional{, continuation_ws}}}}}}
+ maxlinelen\optional{, header_name\optional{, continuation_ws\optional{,
+ errors}}}}}}}
Create a MIME-compliant header that can contain strings in different
character sets.
@@ -79,7 +80,10 @@ whitespace, and is usually either a space or a hard tab character.
This character will be prepended to continuation lines.
\end{classdesc}
-\begin{methoddesc}[Header]{append}{s\optional{, charset}}
+Optional \var{errors} is passed straight through to the
+\method{append()} method.
+
+\begin{methoddesc}[Header]{append}{s\optional{, charset\optional{, errors}}}
Append the string \var{s} to the MIME header.
Optional \var{charset}, if given, should be a \class{Charset} instance
@@ -100,6 +104,9 @@ case, when producing an \rfc{2822}-compliant header using \rfc{2047}
rules, the Unicode string will be encoded using the following charsets
in order: \code{us-ascii}, the \var{charset} hint, \code{utf-8}. The
first character set to not provoke a \exception{UnicodeError} is used.
+
+Optional \var{errors} is passed through to any \function{unicode()} or
+\function{ustr.encode()} call, and defaults to ``strict''.
\end{methoddesc}
\begin{methoddesc}[Header]{encode}{}