File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -528,14 +528,13 @@ I/O Base Classes
528528 It inherits from :class: `IOBase `.
529529
530530 The main difference with :class: `RawIOBase ` is that methods :meth: `read `,
531- :meth: `readinto ` and :meth: `write ` will try (respectively) to read as much
532- input as requested or to consume all given output, at the expense of
533- making perhaps more than one system call.
534-
535- In addition, those methods can raise :exc: `BlockingIOError ` if the
536- underlying raw stream is in non-blocking mode and cannot take or give
537- enough data; unlike their :class: `RawIOBase ` counterparts, they will
538- never return ``None ``.
531+ :meth: `readinto ` and :meth: `write ` will try (respectively) to read
532+ as much input as requested or to emit all provided data.
533+
534+ In addition, if the underlying raw stream is in non-blocking mode, when the
535+ system returns would block :meth: `write ` will raise :exc: `BlockingIOError `
536+ with :attr: `BlockingIOError.characters_written ` and :meth: `read ` will return
537+ data read so far or ``None `` if no data is available.
539538
540539 Besides, the :meth: `read ` method does not have a default
541540 implementation that defers to :meth: `readinto `.
You can’t perform that action at this time.
0 commit comments