Skip to content

Commit cabdf39

Browse files
committed
Make notes more consistent
1 parent 5f1cbae commit cabdf39

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Doc/library/io.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -790,9 +790,8 @@ than raw I/O does.
790790
The *size* argument is now optional.
791791

792792
.. note::
793-
When the underlying raw stream is non-blocking, a ``BlockingIOError``
794-
may be raised if the read operation cannot be completed immediately.
795-
Ensure proper exception handling in such cases.
793+
When the underlying raw stream is non-blocking, a :exc:`BlockingIOError`
794+
may be raised if a read operation cannot be completed immediately.
796795

797796
.. class:: BufferedWriter(raw, buffer_size=DEFAULT_BUFFER_SIZE)
798797

@@ -1022,8 +1021,8 @@ Text I/O
10221021
The *encoding* argument now supports the ``"locale"`` dummy encoding name.
10231022

10241023
.. note::
1025-
If the underlying raw stream is non-blocking, the ``read()`` method may raise a
1026-
``BlockingIOError`` if no data is available immediately.
1024+
When the underlying raw stream is non-blocking, a :exc:`BlockingIOError`
1025+
may be raised if a read operation cannot be completed immediately.
10271026

10281027
:class:`TextIOWrapper` provides these data attributes and methods in
10291028
addition to those from :class:`TextIOBase` and :class:`IOBase`:

0 commit comments

Comments
 (0)