Skip to content

Review notes

Thor Whalen edited this page Nov 16, 2021 · 1 revision

BufferReader.next raises ValueError

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?

BufferReader(...source_reader_info...)

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.

Layer above BufferReader

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

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?

Clone this wiki locally