R. David Murray <rdmur...@bitdance.com> added the comment:

Michael, in general your approach looks sound and is much easier to read and 
comprehend than the original code (which, as the comments say, was never 
refined from the original quick and dirty hack).  However, rather than 
dynamically defining sub-functions each time body_encode is called, I've moved 
the body-construction logic almost completely out of body_encode into a helper 
object.  I think this further clarifies the algorithm.  I also used a simpler 
approach to end-of-list detection (enumerate).  That change is more a matter of 
taste, but does have the advantage of taking fewer lines of code.

If you have time to review this and double check my changes (the tests pass, at 
least), that would be great.  Otherwise I'll just go ahead and apply it.

----------
nosy: +barry
Added file: 
http://bugs.python.org/file21363/quoprimime_body_encode_algorithm.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11606>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to