I'm concerned here - aren't the semantics of ```readline``` and ```readlines``` vastly different from those of ```read```? It seems like this snippet is providing a ```read```-like implementation for all of these.