[issue11606] maxlinelen exceeded by email module's body_encode() function

Michael Henry report at bugs.python.org
Thu Mar 24 11:41:08 CET 2011


Michael Henry <python at drmikehenry.com> added the comment:

David,

Your patch looks fine to me.  I like putting the logic is a
separate class as you've done.  I looked in itertools for
something to perform the job of the each_last() generator I'd
had in my patch, but I didn't see anything.  I like the idea of
encapsulating the test logic of (index + 1 == len(sequence)) in
some way, as each_last() does, rather than having the caller
calculate it.  If that capability exists somewhere in the Python
standard library, it would be my choice to use that.  If it has
to be built just for this test, though, perhaps it's not worth
the extra lines of code to define each_last().

Michael Henry

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11606>
_______________________________________


More information about the Python-bugs-list mailing list