[Python-ideas] BufferedIO and detach

Antoine Pitrou solipsis at pitrou.net
Tue Mar 5 10:22:54 CET 2013


Le Tue, 05 Mar 2013 10:14:08 +1300,
Greg Ewing <greg.ewing at canterbury.ac.nz> a
écrit :
> Guido van Rossum wrote:
> > Personally, I'm not sure that your proposed API (a buffered_only
> > flag to read()) is the best way to go about it. Maybe detach()
> > should return the remaining buffered data?
> 
> Maybe you could be allowed to read() from the buffered
> stream after detatching the underlying source, which
> would then return any data remaining in the buffer.

Perhaps detach() can take an optional argument for that indeed.

Regards

Antoine.





More information about the Python-ideas mailing list