[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

Stefan Krah report at bugs.python.org
Mon Aug 22 16:27:25 CEST 2011


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Of course, there is another interpretation:

[PyBUF_FORMAT]

"The returned buffer must have true format information if this flag is provided. This would be used when the consumer is going to be checking for what 'kind' of data is actually stored. An exporter should always be able to provide this information if requested. If format is not explicitly requested then the format must be returned as NULL (which means "B", or unsigned bytes)"


So, the returned buffer may have false format information ('B' vs. 'i'
in this case) if this flag is not provided.


Do you agree with this? I'll then make it explicit in the documentation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12817>
_______________________________________


More information about the Python-bugs-list mailing list