Remove misleading sentence#11216
Remove misleading sentence#11216benjaminp merged 2 commits intopython:masterfrom Hawk777:fix-buffered-random-docs
Conversation
The sentence, “It inherits BufferedReader and BufferedWriter, and further supports seek() and tell() functionality,” is misleading: it suggests that BufferedRandom is special in that it is seekable, whereas BufferedReader and BufferedWriter are not. However, this is not the case: assuming the underlying raw stream is seekable (which is equally a requirement of BufferedRandom), then BufferedReader and BufferedWriter *are* seekable. Remove the misleading sentence.
benjaminp
left a comment
There was a problem hiding this comment.
I think we still need to say something about seek & tell otherwise it's not clear what BufferedRandom is for at all unless you know what a "random" stream is. We could say seek and tell must be supported.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
For BufferedReader and BufferedWriter, seek and tell operations are optional (they may or may not exist based on the underlying stream). For BufferedRandom, they are mandatory: a BufferedRandom should not be constructed over an unseekable underlying stream. Document this.
|
How about this? I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @benjaminp: please review the changes made to this pull request. |
|
Thanks @Hawk777 for the PR, and @benjaminp for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7. |
|
Thank you for the PR. |
The sentence, “It inherits BufferedReader and BufferedWriter, and
further supports seek() and tell() functionality,” is misleading: it
suggests that BufferedRandom is special in that it is seekable, whereas
BufferedReader and BufferedWriter are not. However, this is not the
case: assuming the underlying raw stream is seekable (which is equally a
requirement of BufferedRandom), then BufferedReader and BufferedWriter
are seekable. Remove the misleading sentence.