Skip to content

Commit 308f14a

Browse files
committed
Add maxlinelen to docstring, delete obsolete wording
1 parent 84c209a commit 308f14a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Lib/email/header.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,12 @@ def encode(self, splitchars=';, \t', maxlinelen=None):
281281
75-character length limit on any given encoded header field, so
282282
line-wrapping must be performed, even with double-byte character sets.
283283
284-
This method will do its best to convert the string to the correct
285-
character set used in email, and encode and line wrap it safely with
286-
the appropriate scheme for that character set.
287-
288-
If the given charset is not known or an error occurs during
289-
conversion, this function will return the header untouched.
284+
Optional maxlinelen specifies the maxiumum length of each generated
285+
line, exclusive of the linesep string. Individual lines may be longer
286+
than maxlinelen if a folding point cannot be found. The first line
287+
will be shorter by the length of the header name plus ": " if a header
288+
name was specified at Header construction time. The default value for
289+
maxlinelen is determined at header construction time.
290290
291291
Optional splitchars is a string containing characters to split long
292292
ASCII lines on, in rough support of RFC 2822's `highest level

0 commit comments

Comments
 (0)