Open
Description
When revision is made we'll have:
from stream2py.examples.stream_source import SimpleCounterString
source = SimpleCounterString(start=1, stop=10)
reader = source.mk_reader()
with reader:
print(reader.read())
Creating the reader requires the buffer to start; with reader: just increments a counter in the source to say that there is one active reader
What should happen if the user fails to enter the reader context before trying to read? should it raise an exception?
reader = source.mk_reader()
reader.read() # should this be an error?