On Sat, Feb 27, 2016 at 11:17 PM, Chris Angelico <ros...@gmail.com> wrote:
>> Ideally, I'd rather not over-read at all. I'd like the user to be able to
>> swap from "read N bytes" to "read to the next delimiter" (and possibly
>> even "read the next line") without losing anything.
>
> If those are the *only* two operations, you should be able to maintain
> your own buffer.

And, I started out by thinking "to next delimiter" and "next line"
were the same thing with different delimiters, but then went and coded
the delimiter so that wouldn't work. Whatevs. If those are the only
*three* operations, the same class with one more method could do it.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to