Skip to content

Reword inheritance diagram for BufferedRandom to encompass _io and _pyio implementations #141627

Description

@tbrugere

Documentation

The documentation for io.BufferedRandom states

A buffered binary stream providing higher-level access to a seekable RawIOBase raw binary stream. It inherits from BufferedReader and BufferedWriter.

(emphasis mine)

Except when runing cpython,

Python3.14.0rc3 (main, Sep182025, 19:47:22) [Clang20.1.4 ] onlinuxType"help", "copyright", "credits"or"license"formoreinformation.
>>>fromioimportBufferedRandom, BufferedReader>>>issubclass(BufferedRandom, BufferedReader)
False>>>BufferedRandom.mro()
[<class'_io.BufferedRandom'>, <class'_io._BufferedIOBase'>, <class'_io._IOBase'>, <class'object'>]

It seems that BufferedRandom does not inherit from either BufferedReader or BufferedWriter

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesdocsDocumentation in the Doc dirtopic-IO

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions