Marc-Andre Lemburg <m...@egenix.com> added the comment: STINNER Victor wrote: > > STINNER Victor <victor.stin...@haypocalc.com> added the comment: > > Le mercredi 25 mai 2011 à 08:23 +0000, Marc-Andre Lemburg a écrit : >>> Do we need an additional method? It seems that this reset() could >>> also be written encoder.encode('', final=True) >> >> +1 >> >> I think that's a much more natural way to implement "finalize the >> encoding output without adding any data to it". > > And so, reset() should discard the output? I can easily adapt my patch > to discard the output (but still call encreset() instead of decreset()).
I'm not sure what you mean by "discard the output". Calling .reset() should still add the closing sequence to the output buffer, if needed. The purpose of .reset() is flush all data and put the codec into a clean state (comparable to the state you get when you start using it). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12171> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com