Rémi Lapeyre <remi.lape...@henki.fr> added the comment: I checked and io.TextIOBase is the only io.IOBase subclass to lack one of read, readinto or write:
>>> import io, inspect >>> for name, obj in inspect.getmembers(io, predicate=inspect.isclass): ... missing = {'read', 'readinto', 'write'} - {name for name, _ in inspect.getmembers(obj)} ... if issubclass(obj, io.IOBase) and missing: ... print(obj, missing, issubclass(obj, io.TextIOBase)) <class 'io.IOBase'> {'write', 'read', 'readinto'} False <class '_io.StringIO'> {'readinto'} True <class 'io.TextIOBase'> {'readinto'} True <class '_io.TextIOWrapper'> {'readinto'} True I can open a PR to fix the conflicts between the two parts of the documentation. I think it's appropriate to change TextIOBase to raise UnsupportedOperation when calling readinto and to change the documentation accordingly. ---------- components: +IO -Documentation nosy: +remi.lapeyre -docs@python, xtreak versions: -Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35848> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com