Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d1adc8a6
Commit
d1adc8a6
authored
Dec 30, 2002
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Describe the new `errors' argument to Header.__init__() and
Header.append()
parent
10ee7a7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Doc/lib/emailheaders.tex
Doc/lib/emailheaders.tex
+9
-2
No files found.
Doc/lib/emailheaders.tex
View file @
d1adc8a6
...
...
@@ -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
}{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment