Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94f90dd

Browse files
committed
Merge: Add maxlinelen to docstring, delete obsolete wording
2 parents 27be5da + 308f14a commit 94f90dd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/email/header.py

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

0 commit comments

Comments
 (0)