[docs] [issue20699] Document that binary IO classes work with bytes-likes objects

Martin Panter report at bugs.python.org
Fri Jun 3 02:25:54 EDT 2016

Martin Panter added the comment:

I agree with avoiding the term “bytes-like object” in 2.7. It is easy to be specific when talking about concrete classes like BufferedWriter and BytesIO. But the harder question is what to specify for the abstract base classes.

In patch v8, I propose to change the documentation to refer to “sequences of bytes which are usable with ‘memoryview’ ”. Technically, some of the _pyio implementations assume more than this (e.g. len(), iteration and slice assignment), but I have left them alone.

Added file: http://bugs.python.org/file43141/bytes-like-param.py2.v8.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list