Skip to content

Commit 42d8384

Browse files
committed
gh-141627: Fix BufferedRandom inheritance documentation
BufferedRandom does not inherit from BufferedReader and BufferedWriter in the C implementation. Update documentation to accurately state that it inherits from BufferedIOBase and provides combined functionality.
1 parent ed73c90 commit 42d8384

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/io.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,9 @@ than raw I/O does.
833833
.. class:: BufferedRandom(raw, buffer_size=DEFAULT_BUFFER_SIZE)
834834

835835
A buffered binary stream providing higher-level access to a seekable
836-
:class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedReader`
837-
and :class:`BufferedWriter`.
836+
:class:`RawIOBase` raw binary stream. It inherits from :class:`BufferedIOBase`
837+
and provides the combined functionality of :class:`BufferedReader` and
838+
:class:`BufferedWriter` for random access streams.
838839

839840
The constructor creates a reader and writer for a seekable raw stream, given
840841
in the first argument. If the *buffer_size* is omitted it defaults to

0 commit comments

Comments
 (0)