homepage

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 Jim.Jewett
Recipients Jim.Jewett, ezio.melotti
Date 2012年02月14日.18:01:52
SpamBayes Score 1.0754355e-06
Marked as misclassified No
Message-id <1329242513.77.0.581823861095.issue14014@psf.upfronthosting.co.za>
In-reply-to
Content
def reset(self):
 """ Flushes and resets the codec buffers used for keeping state.
 Calling this method should ensure that the data on the
 output is put into a clean state, that allows appending
 of new fresh data without having to rescan the whole
 stream to recover state.
 """
 pass
This does not ensure that the stream is flushed, as the docstring promises. I believe the following would work better.
 def reset(self):
 """ Flushes and resets the codec buffers used for keeping state.
 Calling this method should ensure that the data on the
 output is put into a clean state, that allows appending
 of new fresh data without having to rescan the whole
 stream to recover state.
 """
 if hasattr(self.stream, "flush"): self.stream.flush()
History
Date User Action Args
2012年02月14日 18:01:53Jim.Jewettsetrecipients: + Jim.Jewett, ezio.melotti
2012年02月14日 18:01:53Jim.Jewettsetmessageid: <1329242513.77.0.581823861095.issue14014@psf.upfronthosting.co.za>
2012年02月14日 18:01:53Jim.Jewettlinkissue14014 messages
2012年02月14日 18:01:52Jim.Jewettcreate

AltStyle によって変換されたページ (->オリジナル) /