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 lemburg
Recipients amaury.forgeotdarc, arigo, gz, hyeshik.chang, lemburg, vstinner
Date 2011-05-25.23:42:28
SpamBayes Score 2.6180302e-10
Marked as misclassified No
Message-id <4DDD93D9.30909@egenix.com>
In-reply-to <1306360354.24449.1.camel@marge>
Content
STINNER Victor wrote:
> 
> STINNER Victor <victor.stinner@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).
History
Date User Action Args
2011-05-25 23:42:29lemburgsetrecipients: + lemburg, arigo, amaury.forgeotdarc, hyeshik.chang, vstinner, gz
2011-05-25 23:42:28lemburglinkissue12171 messages
2011-05-25 23:42:28lemburgcreate