This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, michael.henry, r.david.murray
Date 2011-03-23.21:43:48
SpamBayes Score 4.3852035e-07
Marked as misclassified No
Message-id <1300916629.78.0.673890352339.issue11606@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-03-23 21:43:50r.david.murraysetrecipients: + r.david.murray, barry, michael.henry
2011-03-23 21:43:49r.david.murraysetmessageid: <1300916629.78.0.673890352339.issue11606@psf.upfronthosting.co.za>
2011-03-23 21:43:49r.david.murraylinkissue11606 messages
2011-03-23 21:43:49r.david.murraycreate