summaryrefslogtreecommitdiffstats
path: root/Doc/lib/librfc822.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-08-03 18:39:36 (GMT)
committerFred Drake <fdrake@acm.org>2001-08-03 18:39:36 (GMT)
commitd86038d1be19c75ed15c13faf7388579c42439b4 (patch)
treed43d4bb99879f8e7f8bfb4aec3d9bbc7ca55f313 /Doc/lib/librfc822.tex
parent7eac0cb04c35529f17b797fa6e5a0872ff1a6a86 (diff)
downloadcpython-d86038d1be19c75ed15c13faf7388579c42439b4.zip
cpython-d86038d1be19c75ed15c13faf7388579c42439b4.tar.gz
cpython-d86038d1be19c75ed15c13faf7388579c42439b4.tar.bz2
Apply the new \mailheader macro where appropriate, and fix a few small
markup inconsistencies.
Diffstat (limited to 'Doc/lib/librfc822.tex')
-rw-r--r--Doc/lib/librfc822.tex33
1 files changed, 17 insertions, 16 deletions
diff --git a/Doc/lib/librfc822.tex b/Doc/lib/librfc822.tex
index 5db0bf3..2b5faff 100644
--- a/Doc/lib/librfc822.tex
+++ b/Doc/lib/librfc822.tex
@@ -72,18 +72,19 @@ are stripped off.
\end{funcdesc}
\begin{funcdesc}{parseaddr}{address}
-Parse \var{address}, which should be the value of some address-containing
-field such as \code{To:} or \code{Cc:}, into its constituent
-``realname'' and ``email address'' parts. Returns a tuple of that
-information, unless the parse fails, in which case a 2-tuple of
-\code{(None, None)} is returned.
+Parse \var{address}, which should be the value of some
+address-containing field such as \mailheader{To} or \mailheader{Cc},
+into its constituent ``realname'' and ``email address'' parts.
+Returns a tuple of that information, unless the parse fails, in which
+case a 2-tuple \code{(None, None)} is returned.
\end{funcdesc}
\begin{funcdesc}{dump_address_pair}{pair}
The inverse of \method{parseaddr()}, this takes a 2-tuple of the form
-\code{(realname, email_address)} and returns the string value suitable
-for a \code{To:} or \code{Cc:} header. If the first element of
-\var{pair} is false, then the second element is returned unmodified.
+\code{(\var{realname}, \var{email_address})} and returns the string
+value suitable for a \mailheader{To} or \mailheader{Cc} header. If
+the first element of \var{pair} is false, then the second element is
+returned unmodified.
\end{funcdesc}
\begin{funcdesc}{parsedate}{date}
@@ -142,9 +143,9 @@ object is seekable.
\begin{methoddesc}{isheader}{line}
Returns a line's canonicalized fieldname (the dictionary key that will
be used to index it) if the line is a legal \rfc{2822} header; otherwise
-returns None (implying that parsing should stop here and the line be
-pushed back on the input stream). It is sometimes useful to override
-this method in a subclass.
+returns \code{None} (implying that parsing should stop here and the
+line be pushed back on the input stream). It is sometimes useful to
+override this method in a subclass.
\end{methoddesc}
\begin{methoddesc}{islast}{line}
@@ -200,8 +201,8 @@ header matching \var{name} exists, return \code{(None, None)};
otherwise both the full name and the address are (possibly empty)
strings.
-Example: If \var{m}'s first \code{From} header contains the string
-\code{'jack@cwi.nl (Jack Jansen)'}, then
+Example: If \var{m}'s first \mailheader{From} header contains the
+string \code{'jack@cwi.nl (Jack Jansen)'}, then
\code{m.getaddr('From')} will yield the pair
\code{('Jack Jansen', 'jack@cwi.nl')}.
If the header contained
@@ -211,14 +212,14 @@ exact same result.
\begin{methoddesc}{getaddrlist}{name}
This is similar to \code{getaddr(\var{list})}, but parses a header
-containing a list of email addresses (e.g.\ a \code{To} header) and
+containing a list of email addresses (e.g.\ a \mailheader{To} header) and
returns a list of \code{(\var{full name}, \var{email address})} pairs
(even if there was only one address in the header). If there is no
header matching \var{name}, return an empty list.
If multiple headers exist that match the named header (e.g. if there
-are several \code{Cc} headers), all are parsed for addresses. Any
-continuation lines the named headers contain are also parsed.
+are several \mailheader{Cc} headers), all are parsed for addresses.
+Any continuation lines the named headers contain are also parsed.
\end{methoddesc}
\begin{methoddesc}{getdate}{name}