New submission from Steve Palmer :
class io.IOBase states "Even though IOBase does not declare read(), readinto(),
or write() because their signatures will vary, implementations and clients
should consider those methods part of the interface. Also, implementations may
raise a ValueErro
Steve Palmer added the comment:
I agree with Karthikeyan that the method does not apply in the io.TextIOBase
class context. I'm sorry that I didn't spot the note in the description of
io.TextIOBase - though I think that it is easy to miss.
I'd suggest that there are two way
Steve Palmer added the comment:
I don't have a "real" use case. I discovered the issue when I was developing a
unittest suite for what it means to be "file-like". I've been codifying the
description in the standard library and exercising my tests against the
New submission from Steve Palmer :
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
Steve Palmer added the comment:
The description of read in io.BufferedReader.read function states "Read and
return size bytes, or if size is not given or negative, until EOF or if the
read call would block in non-blocking mode." This does mention the non-block
mode scenario, b
New submission from Steve Palmer :
An io.BUfferedReader object has an (inherited) writable method that returns
False. io.IOBase states in the description of the writable method that "If
False, write() and truncate() will raise OSError."
However, if the BufferedReader object is c
Change by Steve Palmer :
--
nosy: +martin.panter
___
Python tracker
<https://bugs.python.org/issue35950>
___
___
Python-bugs-list mailing list
Unsubscribe: