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
ab9b238c
Commit
ab9b238c
authored
Oct 16, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few usage and style-guide conformance issues.
parent
3eb46f3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Doc/lib/emailparser.tex
Doc/lib/emailparser.tex
+10
-10
No files found.
Doc/lib/emailparser.tex
View file @
ab9b238c
...
...
@@ -13,8 +13,8 @@ most email document structures, including MIME documents. You can
pass the parser a string or a file object, and the parser will return
to you the root
\class
{
Message
}
instance of the object tree. For
simple, non-MIME messages the payload of this root object will likely
be a string
(e.g. containing the text of the message)
. For MIME
messages, the root object will return
1
from its
be a string
containing the text of the message
. For MIME
messages, the root object will return
true
from its
\method
{
is
_
multipart()
}
method, and the subparts can be accessed via
the
\method
{
get
_
payload()
}
and
\method
{
walk()
}
methods.
...
...
@@ -39,10 +39,10 @@ same API as the \class{Parser} class.
\begin{classdesc}
{
Parser
}{
\optional
{_
class
}}
The constructor for the
\class
{
Parser
}
class takes a single optional
argument
\var
{_
class
}
. This must be
callable factory (i.e. a function
or a class), and it is used whenever a sub-message object needs to be
created. It defaults to
\class
{
Message
}
(see
\refmodule
{
email.Message
}
).
\var
{_
class
}
will be called with zero
argument
\var
{_
class
}
. This must be
a callable factory (such as a
function or a class), and it is used whenever a sub-message object
needs to be
created. It defaults to
\class
{
Message
}
(see
\refmodule
{
email.Message
}
).
The factory will be called without
arguments.
\end{classdesc}
...
...
@@ -105,9 +105,9 @@ Here are some notes on the parsing semantics:
blocks of headers,
\class
{
Parser
}
will create a non-multipart
object containing non-multipart subobjects for each header
block.
\item
Another exception is for
\mimetype
{
message/*
}
types (
i.e.
more
\item
Another exception is for
\mimetype
{
message/*
}
types (more
general than
\mimetype
{
message/delivery-status
}
). These are
typically
\mimetype
{
message/rfc822
}
type
messages, represented as a
non-multipart object containing a singleton payload
, another
non-multipart
\class
{
Message
}
instance.
typically
\mimetype
{
message/rfc822
}
messages, represented as a
non-multipart object containing a singleton payload
which is
another
non-multipart
\class
{
Message
}
instance.
\end{itemize}
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