On 15 June 2014 10:41, Benjamin Peterson <benjamin at python.org> wrote: > On Sat, Jun 14, 2014, at 15:39, Nikolaus Rath wrote: >> It seems to me that a much cleaner solution would be to simply declare >> _pyio's readinto to only work with bytearrays, and to explicitly raise a >> (more helpful) TypeError if anything else is passed in. > > That seems reasonable. I don't think _pyio's behavior is terribly > important compared to the C _io module. _pyio was written before the various memoryview fixes that were implemented in Python 3.3 - it seems to me it would make more sense to use memoryview to correctly handle arbitrary buffer exporters (we implemented similar fixes for the base64 module in 3.4). Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4