]> granicus.if.org Git - python/commit
More internal refinements of the ascii splitting algorithm.
authorBarry Warsaw <barry@python.org>
Fri, 7 Mar 2003 15:39:37 +0000 (15:39 +0000)
committerBarry Warsaw <barry@python.org>
Fri, 7 Mar 2003 15:39:37 +0000 (15:39 +0000)
commit9f3fcd9c23be0b430e335d36ea374ce9838e390e
tree03f801e51d7b8e2a1a973ac5183b81d04f5c30a3
parentc4d6bdd58a58b365556abfe60c9f5b5f73c555f8
More internal refinements of the ascii splitting algorithm.

_encode_chunks(): Pass maxlinelen in instead of always using
self._maxlinelen, so we can adjust for shorter initial lines.
Pass this value through to _max_append().

encode(): Weave maxlinelen through to the _encode_chunks() call.

_split_ascii(): When recursively splitting a line on spaces
(i.e. lower level syntactic split), don't append the whole returned
string.  Instead, split it on linejoiners and extend the lines up to
the last line (for proper packing).  Calculate the linelen based on
the last element in the this list.
Lib/email/Header.py