summaryrefslogtreecommitdiff
path: root/Doc/library/quopri.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-02 20:34:52 +0000
committerGeorg Brandl <georg@python.org>2009-09-02 20:34:52 +0000
commit1824415470243ab8fb08172e2b32b4efe73e0295 (patch)
tree6246f8f0cd792ee5325bb49a87e9e46969963dda /Doc/library/quopri.rst
parent0bb1cc72c8e37a5ac53b800667693c4330beb5a3 (diff)
downloadcpython-git-1824415470243ab8fb08172e2b32b4efe73e0295.tar.gz
Switch more function arguments docs to new-style.
Diffstat (limited to 'Doc/library/quopri.rst')
-rw-r--r--Doc/library/quopri.rst17
1 files changed, 9 insertions, 8 deletions
diff --git a/Doc/library/quopri.rst b/Doc/library/quopri.rst
index 8f525efdf8..7ceb66147b 100644
--- a/Doc/library/quopri.rst
+++ b/Doc/library/quopri.rst
@@ -1,4 +1,3 @@
-
:mod:`quopri` --- Encode and decode MIME quoted-printable data
==============================================================
@@ -19,7 +18,7 @@ few nonprintable characters; the base64 encoding scheme available via the
sending a graphics file.
-.. function:: decode(input, output[,header])
+.. function:: decode(input, output, header=False)
Decode the contents of the *input* file and write the resulting decoded binary
data to the *output* file. *input* and *output* must either be file objects or
@@ -30,7 +29,7 @@ sending a graphics file.
Mail Extensions) Part Two: Message Header Extensions for Non-ASCII Text".
-.. function:: encode(input, output, quotetabs)
+.. function:: encode(input, output, quotetabs, header=False)
Encode the contents of the *input* file and write the resulting quoted-printable
data to the *output* file. *input* and *output* must either be file objects or
@@ -38,20 +37,22 @@ sending a graphics file.
``input.readline()`` returns an empty string. *quotetabs* is a flag which
controls whether to encode embedded spaces and tabs; when true it encodes such
embedded whitespace, and when false it leaves them unencoded. Note that spaces
- and tabs appearing at the end of lines are always encoded, as per :rfc:`1521`.
+ and tabs appearing at the end of lines are always encoded, as per
+ :rfc:`1521`. *header* is a flag which controls if spaces are encoded as
+ underscores as per :rfc:`1522`.
-.. function:: decodestring(s[,header])
+.. function:: decodestring(s, header=False)
Like :func:`decode`, except that it accepts a source string and returns the
corresponding decoded string.
-.. function:: encodestring(s[, quotetabs])
+.. function:: encodestring(s, quotetabs=False, header=False)
Like :func:`encode`, except that it accepts a source string and returns the
- corresponding encoded string. *quotetabs* is optional (defaulting to 0), and is
- passed straight through to :func:`encode`.
+ corresponding encoded string. *quotetabs* and *header* are optional
+ (defaulting to ``False``), and are passed straight through to :func:`encode`.
.. seealso::