Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1adc8a

Browse files
committed
Describe the new `errors' argument to Header.__init__() and
Header.append()
1 parent 10ee7a7 commit d1adc8a

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Doc/lib/emailheaders.tex

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
Here is the \class{Header} class description:
4949

5050
\begin{classdesc}{Header}{\optional{s\optional{, charset\optional{,
51-
maxlinelen\optional{, header_name\optional{, continuation_ws}}}}}}
51+
maxlinelen\optional{, header_name\optional{, continuation_ws\optional{,
52+
errors}}}}}}}
5253
Create a MIME-compliant header that can contain strings in different
5354
character sets.
5455

@@ -79,7 +80,10 @@
7980
This character will be prepended to continuation lines.
8081
\end{classdesc}
8182

82-
\begin{methoddesc}[Header]{append}{s\optional{, charset}}
83+
Optional \var{errors} is passed straight through to the
84+
\method{append()} method.
85+
86+
\begin{methoddesc}[Header]{append}{s\optional{, charset\optional{, errors}}}
8387
Append the string \var{s} to the MIME header.
8488

8589
Optional \var{charset}, if given, should be a \class{Charset} instance
@@ -100,6 +104,9 @@
100104
rules, the Unicode string will be encoded using the following charsets
101105
in order: \code{us-ascii}, the \var{charset} hint, \code{utf-8}. The
102106
first character set to not provoke a \exception{UnicodeError} is used.
107+
108+
Optional \var{errors} is passed through to any \function{unicode()} or
109+
\function{ustr.encode()} call, and defaults to ``strict''.
103110
\end{methoddesc}
104111

105112
\begin{methoddesc}[Header]{encode}{}

0 commit comments

Comments
 (0)