This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients Henning.von.Bargen, benjamin.peterson, docs@python, martin.panter, pitrou, python-dev, r.david.murray, serhiy.storchaka
Date 2016-06-03.09:59:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don’t see the point of mentioning array() objects at all. It’s hard to support array in a Python 2 implementation, as demonstrated by readinto(). And the special support for array('b') won’t help if you pass in array('B') with values 128–255. I see this as an implementation detail of _pyio, rather than a need for others to follow its lead.

The array('b') code was added by r56225. I guess it is experimental code from an early phase of the io module. Also, test_array_writes() is disabled for _pyio in 2.7 (, and in 2.6 (

I think it is better to avoid “such as” and be specific about what has to be supported. Perhaps:

readinto(b): The object *b* should be a pre-allocated, writable array of bytes, either :class:`bytearray` or :class:`memoryview`.

.. versionchanged:: 2.7
   Support for :class:`memoryview`.

write(b): The object *b* should be an array of bytes, either :class:`str`, :class:`bytearray`, or :class:`memoryview`.

.. versionchanged:: 2.7
   Support for :class:`memoryview`.
Date User Action Args
2016-06-03 09:59:13martin.pantersetrecipients: + martin.panter, pitrou, benjamin.peterson, r.david.murray, docs@python, python-dev, serhiy.storchaka, Henning.von.Bargen
2016-06-03 09:59:13martin.pantersetmessageid: <>
2016-06-03 09:59:13martin.panterlinkissue20699 messages
2016-06-03 09:59:12martin.pantercreate