summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2014-06-25 08:12:03 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2014-06-25 08:12:03 (GMT)
commit99597c4d12e358174275945d97e504c0318a3783 (patch)
treed73d5e56a96c595053af052d335bca89ba471f5b /Lib
parentab960f838c71bcdedddf26de48c5c911051e8ada (diff)
downloadcpython-99597c4d12e358174275945d97e504c0318a3783.zip
cpython-99597c4d12e358174275945d97e504c0318a3783.tar.gz
cpython-99597c4d12e358174275945d97e504c0318a3783.tar.bz2
Correct the quopri module documentation. Mention the correct types of the
parameters on encodestring and decodestring. Patch by Petri Lehtinen.
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/quopri.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/Lib/quopri.py b/Lib/quopri.py
index e5bd010..46c2a4c 100755
--- a/Lib/quopri.py
+++ b/Lib/quopri.py
@@ -44,13 +44,11 @@ def quote(c):
def encode(input, output, quotetabs, header=False):
"""Read 'input', apply quoted-printable encoding, and write to 'output'.
- 'input' and 'output' are files with readline() and write() methods.
- The 'quotetabs' flag indicates whether embedded tabs and spaces should be
- quoted. Note that line-ending tabs and spaces are always encoded, as per
- RFC 1521.
- The 'header' flag indicates whether we are encoding spaces as _ as per
- RFC 1522.
- """
+ 'input' and 'output' are binary file objects. The 'quotetabs' flag
+ indicates whether embedded tabs and spaces should be quoted. Note that
+ line-ending tabs and spaces are always encoded, as per RFC 1521.
+ The 'header' flag indicates whether we are encoding spaces as _ as per RFC
+ 1522."""
if b2a_qp is not None:
data = input.read()
@@ -118,7 +116,7 @@ def encodestring(s, quotetabs=False, header=False):
def decode(input, output, header=False):
"""Read 'input', apply quoted-printable decoding, and write to 'output'.
- 'input' and 'output' are files with readline() and write() methods.
+ 'input' and 'output' are binary file objects.
If 'header' is true, decode underscore as space (per RFC 1522)."""
if a2b_qp is not None: