Message310036
| Author |
martin.panter |
| Recipients |
benjamin.peterson, martin.panter, njs, stutzbach |
| Date |
2018年01月16日.05:09:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1516079389.64.0.467229070634.issue32561@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
BufferedIOBase is an abstract class and, despite the name, doesn’t necessitate a buffer or cache. Adding methods and properties might break compatibility with third-party implementations, or get ugly with optional methods and multiple versions of the API. It seems like it would be better to extend the concrete APIs: io.BufferedReader, BufferedWriter and/or FileIO.
In Issue 32475 there is a proposal to add a "getbuffn" method returning the amount of unread pending data in a reader object. Perhaps that would be enough for reading.
I would support an similar API for BufferedWriter etc. Perhaps a property called "available_space". You could check that and decide whether to do a direct non-blocking "write", or launch a blocking "write" in the background. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年01月16日 05:09:49 | martin.panter | set | recipients:
+ martin.panter, benjamin.peterson, stutzbach, njs |
| 2018年01月16日 05:09:49 | martin.panter | set | messageid: <1516079389.64.0.467229070634.issue32561@psf.upfronthosting.co.za> |
| 2018年01月16日 05:09:49 | martin.panter | link | issue32561 messages |
| 2018年01月16日 05:09:49 | martin.panter | create |
|