Message334630
| Author |
steverpalmer |
| Recipients |
steverpalmer |
| Date |
2019年01月31日.15:21:49 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1548948110.23.0.999331035986.issue35869@roundup.psfhosted.org> |
| In-reply-to |
| Content |
class io.BufferedIOBase states "In addition, those methods [read(), readinto() and write()] can raise BlockingIOError if the underlying raw stream is in non-blocking mode and cannot take or give enough data; unlike their RawIOBase counterparts, they will never return None."
However, class.io.BufferedReader (inheriting from io.BufferedIOBase) *does* return None in this case. Admittedly, io.BufferedReader does says it is overriding the inherited method, but I'm surprised that change in behaviour declared for buffered objects, is reverted to the RarIOBase behaviour on a more specific class.
The attached file (a little long - sorry), simulates a slow non-blocking raw file, which it wraps in a BufferReader to test the behaviour defined in BufferedIOBase. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2019年01月31日 15:21:54 | steverpalmer | set | recipients:
+ steverpalmer |
| 2019年01月31日 15:21:50 | steverpalmer | set | messageid: <1548948110.23.0.999331035986.issue35869@roundup.psfhosted.org> |
| 2019年01月31日 15:21:50 | steverpalmer | link | issue35869 messages |
| 2019年01月31日 15:21:50 | steverpalmer | create |
|