mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Remove obsolete \setindexsubitem macros.
Massive migration to methoddesc and memberdesc. Logical markup as needed. A sprinkling of index entries for flavor.
This commit is contained in:
parent
71c1e502f0
commit
fc57619811
36 changed files with 1528 additions and 1462 deletions
|
|
@ -1,8 +1,7 @@
|
|||
\section{Standard Module \sectcode{mimetools}}
|
||||
\section{Standard Module \module{mimetools}}
|
||||
\label{module-mimetools}
|
||||
\stmodindex{mimetools}
|
||||
|
||||
\setindexsubitem{(in module mimetools)}
|
||||
|
||||
This module defines a subclass of the \class{rfc822.Message} class and
|
||||
a number of utility functions that are useful for the manipulation for
|
||||
|
|
@ -53,9 +52,7 @@ open file \var{output}. The block size is currently fixed at 8192.
|
|||
The \class{Message} class defines the following methods in
|
||||
addition to the \class{rfc822.Message} methods:
|
||||
|
||||
\setindexsubitem{(mimetool.Message method)}
|
||||
|
||||
\begin{funcdesc}{getplist}{}
|
||||
\begin{methoddesc}{getplist}{}
|
||||
Return the parameter list of the \code{content-type} header. This is
|
||||
a list if strings. For parameters of the form
|
||||
\samp{\var{key}=\var{value}}, \var{key} is converted to lower case but
|
||||
|
|
@ -63,36 +60,36 @@ a list if strings. For parameters of the form
|
|||
\samp{Content-type: text/html; spam=1; Spam=2; Spam} then
|
||||
\method{getplist()} will return the Python list \code{['spam=1',
|
||||
'spam=2', 'Spam']}.
|
||||
\end{funcdesc}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{funcdesc}{getparam}{name}
|
||||
\begin{methoddesc}{getparam}{name}
|
||||
Return the \var{value} of the first parameter (as returned by
|
||||
\method{getplist()} of the form \samp{\var{name}=\var{value}} for the
|
||||
given \var{name}. If \var{value} is surrounded by quotes of the form
|
||||
`\code{<}...\code{>}' or `\code{"}...\code{"}', these are removed.
|
||||
\end{funcdesc}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{funcdesc}{getencoding}{}
|
||||
\begin{methoddesc}{getencoding}{}
|
||||
Return the encoding specified in the \code{content-transfer-encoding}
|
||||
message header. If no such header exists, return \code{'7bit'}. The
|
||||
encoding is converted to lower case.
|
||||
\end{funcdesc}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{funcdesc}{gettype}{}
|
||||
\begin{methoddesc}{gettype}{}
|
||||
Return the message type (of the form \samp{\var{type}/\var{subtype}})
|
||||
as specified in the \code{content-type} header. If no such header
|
||||
exists, return \code{'text/plain'}. The type is converted to lower
|
||||
case.
|
||||
\end{funcdesc}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{funcdesc}{getmaintype}{}
|
||||
\begin{methoddesc}{getmaintype}{}
|
||||
Return the main type as specified in the \code{content-type} header.
|
||||
If no such header exists, return \code{'text'}. The main type is
|
||||
converted to lower case.
|
||||
\end{funcdesc}
|
||||
\end{methoddesc}
|
||||
|
||||
\begin{funcdesc}{getsubtype}{}
|
||||
\begin{methoddesc}{getsubtype}{}
|
||||
Return the subtype as specified in the \code{content-type} header. If
|
||||
no such header exists, return \code{'plain'}. The subtype is
|
||||
converted to lower case.
|
||||
\end{funcdesc}
|
||||
\end{methoddesc}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue