-
Notifications
You must be signed in to change notification settings - Fork 2
Review notes
BufferReader.next
raises ValueError
when no item found (that has key greater than last returned item).
Why not StopIteration
as next(iter([]))
does?
Is next
more akin to a read
in io
objects?
It's required, yet all it does is hold it in case someone asks. Should such an argument really be required?
BufferReader
is perhaps not meant to be used by a user directly?
In that case, shouldn't we mark that in code (not expose it, and even _BufferReader
it?
At the very least document it.
Might there be a need for a layer on top of buffer reader that actually fixes the reading protocols instead of having to specify these at every read? I'm referring to the ability of "currying" (think functools.partial
for the whole class) the read params.
The key is for sorting. But what is sorting for? When do we actually need sorting, and when do we actually need the source to tell downstream processes how they should order things.
For example, what would the pros/cons be to having reads provide (time.time(), data)
by default?
Not always necessary overhead (say, we have a more precise timestamp in the data itself)?
In that case, back to; is sorting always a necessary overhead?