@@ -72,18 +72,19 @@ \section{\module{rfc822} ---
7272\end {funcdesc }
7373
7474\begin {funcdesc }{parseaddr}{address}
75- Parse \var {address}, which should be the value of some address-containing
76- field such as \code {To: } or \code {Cc:}, into its constituent
77- `` realname'' and `` email address'' parts. Returns a tuple of that
78- information, unless the parse fails, in which case a 2-tuple of
79- \code {(None, None)} is returned.
75+ Parse \var {address}, which should be the value of some
76+ address-containing field such as \mailheader {To} or \mailheader {Cc},
77+ into its constituent `` realname'' and `` email address'' parts.
78+ Returns a tuple of that information, unless the parse fails, in which
79+ case a 2-tuple \code {(None, None)} is returned.
8080\end {funcdesc }
8181
8282\begin {funcdesc }{dump_address_pair}{pair}
8383The inverse of \method {parseaddr()}, this takes a 2-tuple of the form
84- \code {(realname, email_address)} and returns the string value suitable
85- for a \code {To:} or \code {Cc:} header. If the first element of
86- \var {pair} is false, then the second element is returned unmodified.
84+ \code {(\var {realname}, \var {email_address})} and returns the string
85+ value suitable for a \mailheader {To} or \mailheader {Cc} header. If
86+ the first element of \var {pair} is false, then the second element is
87+ returned unmodified.
8788\end {funcdesc }
8889
8990\begin {funcdesc }{parsedate}{date}
@@ -142,9 +143,9 @@ \subsection{Message Objects \label{message-objects}}
142143\begin {methoddesc }{isheader}{line}
143144Returns a line's canonicalized fieldname (the dictionary key that will
144145be used to index it) if the line is a legal \rfc {2822} header; otherwise
145- returns None (implying that parsing should stop here and the line be
146- pushed back on the input stream). It is sometimes useful to override
147- this method in a subclass.
146+ returns \code { None} (implying that parsing should stop here and the
147+ line be pushed back on the input stream). It is sometimes useful to
148+ override this method in a subclass.
148149\end {methoddesc }
149150
150151\begin {methoddesc }{islast}{line}
@@ -200,8 +201,8 @@ \subsection{Message Objects \label{message-objects}}
200201otherwise both the full name and the address are (possibly empty)
201202strings.
202203
203- Example: If \var {m}'s first \code {From} header contains the string
204- \code {'
[email protected] (Jack Jansen)'}, then
204+ Example: If \var {m}'s first \mailheader {From} header contains the
205+ string \code {'
[email protected] (Jack Jansen)'}, then
205206\code {m.getaddr('From')} will yield the pair
206207\code {('Jack Jansen',
'[email protected] ' )}.
207208If the header contained
@@ -211,14 +212,14 @@ \subsection{Message Objects \label{message-objects}}
211212
212213\begin {methoddesc }{getaddrlist}{name}
213214This is similar to \code {getaddr(\var {list})}, but parses a header
214- containing a list of email addresses (e.g.\ a \code {To} header) and
215+ containing a list of email addresses (e.g.\ a \mailheader {To} header) and
215216returns a list of \code {(\var {full name}, \var {email address})} pairs
216217(even if there was only one address in the header). If there is no
217218header matching \var {name}, return an empty list.
218219
219220If multiple headers exist that match the named header (e.g. if there
220- are several \code {Cc} headers), all are parsed for addresses. Any
221- continuation lines the named headers contain are also parsed.
221+ are several \mailheader {Cc} headers), all are parsed for addresses.
222+ Any continuation lines the named headers contain are also parsed.
222223\end {methoddesc }
223224
224225\begin {methoddesc }{getdate}{name}
0 commit comments