@@ -24,37 +24,37 @@ sending a graphics file.
2424.. function :: decode(input, output, header=False)
2525
2626 Decode the contents of the *input * file and write the resulting decoded binary
27- data to the *output * file. *input * and *output * must be :term: `file objects
28- <file object> `. *input * will be read until ``input.readline() `` returns an
29- empty string. If the optional argument *header * is present and true, underscore
27+ data to the *output * file. *input * and *output * must be :term: `binary file objects
28+ <file object> `. If the optional argument *header * is present and true, underscore
3029 will be decoded as space. This is used to decode "Q"-encoded headers as
3130 described in :rfc: `1522 `: "MIME (Multipurpose Internet Mail Extensions)
3231 Part Two: Message Header Extensions for Non-ASCII Text".
3332
3433
3534.. function :: encode(input, output, quotetabs, header=False)
3635
37- Encode the contents of the *input * file and write the resulting quoted-printable
38- data to the *output * file. *input * and *output * must be :term: ` file objects
39- <file object> `. * input * will be read until `` input.readline() `` returns an
40- empty string. * quotetabs * is a flag which controls whether to encode embedded
41- spaces and tabs; when true it encodes such embedded whitespace, and when
42- false it leaves them unencoded. Note that spaces and tabs appearing at the
43- end of lines are always encoded, as per :rfc: `1521 `. *header * is a flag
44- which controls if spaces are encoded as underscores as per :rfc: `1522 `.
36+ Encode the contents of the *input * file and write the resulting quoted-
37+ printable data to the *output * file. *input * and *output * must be
38+ :term: ` binary file objects <file object> `. * quotetabs *, a flag which controls
39+ whether to encode embedded spaces and tabs must be provideda and when true it
40+ encodes such embedded whitespace, and when false it leaves them unencoded.
41+ Note that spaces and tabs appearing at the end of lines are always encoded,
42+ as per :rfc: `1521 `. *header * is a flag which controls if spaces are encoded
43+ as underscores as per :rfc: `1522 `.
4544
4645
4746.. function :: decodestring(s, header=False)
4847
49- Like :func: `decode `, except that it accepts a source string and returns the
50- corresponding decoded string .
48+ Like :func: `decode `, except that it accepts a source :class: ` bytes ` and
49+ returns the corresponding decoded :class: ` bytes ` .
5150
5251
5352.. function :: encodestring(s, quotetabs=False, header=False)
5453
55- Like :func: `encode `, except that it accepts a source string and returns the
56- corresponding encoded string. *quotetabs * and *header * are optional
57- (defaulting to ``False ``), and are passed straight through to :func: `encode `.
54+ Like :func: `encode `, except that it accepts a source :class: `bytes ` and
55+ returns the corresponding encoded :class: `bytes `. By default, it sends a
56+ False value to *quotetabs * parameter of the :func: `encode ` function.
57+
5858
5959
6060.. seealso ::
0 commit comments