M.-A. Lemburg wrote:
I don't have time to comment on this this week, I'll respond next week.
Overall, I don't like the idea of adding extra APIs breaking the existing codec API.
Adding a final argument that defaults to False doesn't break the API for the callers, only for the implementors.
And if we drop the final argument, the API is completely backwards compatible both for users and implementors. The only thing that gets added is the feed() method, that implementors don't have to overwrite.
I believe that we can extend stream codecs to also work in a feed mode without breaking the API.
Abandoning the final argument and adding a feed() method would IMHO be the simplest way to do this.
But then there's no way to make sure that every byte from the input stream is really consumed.
Bye, Walter Dörwald