M.-A. Lemburg wrote:
Walter Dörwald wrote:
Without the feed method(), we need the following:
- A StreamQueue class that a) supports writing at one end and reading at the other end b) has a method for pushing back unused bytes to be returned in the next call to read()
As already stated in a previous post, I don't think StreamQueue needs a pushback() method. trailing bytes should all be stored in the StreamReader.
It also needs a method giving the number of pending bytes in the queue or just an API .has_pending_data() that returns True/False.
What would this method be used for?
Bye, Walter Dörwald