We could use io.BufferedReader, io.BufferedWriter and io.BufferedRandom, but I suppose they’re too specific. In the typing module we have BinaryIO but it’s not further differentiated. Perhaps we could add typing.BinaryInput and typing.BinaryOutput?
IIUC BufferedIOBase guarantees that all requested data is read/written in read() and write(), whereas this isn’t guaranteed in RawIOBase. But both of these classes are typing.BinaryIO nonetheless. Cody’s first reply explains it better.
I was trying to increase the signal-to-noise ratio for the purposes of this discussion, as we all seem to agree that it’s an int!