This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steverpalmer
Recipients remi.lapeyre, steverpalmer
Date 2019-01-29.16:50:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548780634.53.0.112866724192.issue35848@roundup.psfhosted.org>
In-reply-to
Content
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 ways to clear this up:

1. change only the documentation to read "Even though IOBase does not declare read() or write() because their signatures will vary, implementations and clients should consider those methods part of the interface."  (deleting reference to readinto())

2. change the standard library for io.TextIOBase to add a method readinto which will raise an UnsupportedOperation.

With option 1, the descriptions for io.RawIOBase and io.BufferedIOBase both include description of the readinto method, so nothing is lost by removing mention of it at the io.IOBase level of the hierarchy.  In any case, readinto() is not defined on the io.IOBase class.

>>> 'readinto' not in dir(io.IOBase)
True

With option 2, it feels like this is closer to the design intent of a common interface over similar but distinguished classes.  It also avoids removing things from the documentation in case someone already has some expectations of the behaviour.
History
Date User Action Args
2019-01-29 16:50:36steverpalmersetrecipients: + steverpalmer, remi.lapeyre
2019-01-29 16:50:34steverpalmersetmessageid: <1548780634.53.0.112866724192.issue35848@roundup.psfhosted.org>
2019-01-29 16:50:34steverpalmerlinkissue35848 messages
2019-01-29 16:50:34steverpalmercreate