Kaydet (Commit) 52b39f5b authored tarafından Barry Warsaw's avatar Barry Warsaw

body_line_iterator() now takes a decode argument.

üst 08898499
...@@ -6,13 +6,15 @@ Iterating over a message object tree is fairly easy with the ...@@ -6,13 +6,15 @@ Iterating over a message object tree is fairly easy with the
provides some useful higher level iterations over message object provides some useful higher level iterations over message object
trees. trees.
\begin{funcdesc}{body_line_iterator}{msg} \begin{funcdesc}{body_line_iterator}{msg\optional{, decode}}
This iterates over all the payloads in all the subparts of \var{msg}, This iterates over all the payloads in all the subparts of \var{msg},
returning the string payloads line-by-line. It skips over all the returning the string payloads line-by-line. It skips over all the
subpart headers, and it skips over any subpart with a payload that subpart headers, and it skips over any subpart with a payload that
isn't a Python string. This is somewhat equivalent to reading the isn't a Python string. This is somewhat equivalent to reading the
flat text representation of the message from a file using flat text representation of the message from a file using
\method{readline()}, skipping over all the intervening headers. \method{readline()}, skipping over all the intervening headers.
Optional \var{decode} is passed through to \method{Message.get_payload()}.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{typed_subpart_iterator}{msg\optional{, \begin{funcdesc}{typed_subpart_iterator}{msg\optional{,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment