Benjamin Peterson <benja...@python.org> added the comment:

2011/5/4 John O'Connor <rep...@bugs.python.org>:
>
> John O'Connor <tehj...@gmail.com> added the comment:
>
> I am new to the community but hoping to start contributing or at least 
> following issues and learning :)
>
> I'm looking at bufferediobase_readinto(). What I haven't yet figured out is 
> why .readinto() is (currently) implemented at this layer of the hierarchy. 
> You have to have a raw read buffer available to read from and I'm not sure 
> how one would acquire that from here (without calling .read() or something 
> that has been overridden and knows about the raw buffer).

Why is that? You can, as the BufferedIOBase implementation does, just
call read() and stick it into the buffer.

>
> I feel like bufferediobase_readinto() should return unsupported. Also 
> readinto(), in theory, is lower level than read. if read isn't implemented at 
> this layer why is readinto()?

To provide a simple implementation for unsophisticated subclasses.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to